|
POST
|
Might be a browser's cache issue. Try setting the 'DisableClientCaching' property to true. This adds a timestamp parameter to the request. /Dominique
... View more
05-03-2010
01:51 AM
|
0
|
0
|
958
|
|
POST
|
Looks like you affect the same graphic to 2 graphics layers. By changing the symbology of one graphic, you are changing it for the two layers. Try to manage only one graphics layer and when the selection changes, reset the symbol of the previous selection to 'DefaultMarkerSymbol'. /Dominique
... View more
04-28-2010
10:39 AM
|
0
|
0
|
254
|
|
POST
|
It should work the same way when a sublayer is part of a group. Look with Fiddler or Firebug what the url to get the image is. You should see a layers parameter with the list of visible layers. /Dominique
... View more
04-28-2010
07:17 AM
|
0
|
0
|
518
|
|
POST
|
This thread might help : http://forums.arcgis.com/threads/2300-System.Runtime.Serialization-Version /Dominique
... View more
04-28-2010
07:10 AM
|
0
|
0
|
398
|
|
POST
|
You have to initialize the LayerIds property of your identifyParameter with the list of currently visible layers. The confusion is coming from the 'visible' value of the LayerOption. This option means 'identify the layers visible in the map service' (i.e the layers visible before you turned on/off some layers by code). /Dominique
... View more
04-28-2010
02:03 AM
|
0
|
0
|
460
|
|
POST
|
With the 'address to location' sample, you can use 'centerAndZoom' instead of ZoomToResolution this way: //if (_firstZoom)
//{
// MyMap.ZoomToResolution(MyMap.Resolution / 6, pt);
// _firstZoom = false;
//}
//else
// MyMap.PanTo(pt);
centerAndZoom(MyMap, pt, MyMap.MinimumResolution * 4);
This will give good results. /Dominique
... View more
04-27-2010
09:42 AM
|
0
|
0
|
776
|
|
POST
|
After removing the dust from my student geometry books, I eventually got a method which centers AND pans to a point. private void centerAndZoom(ESRI.ArcGIS.Client.Map map, ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint, double resolution)
{
double ratio = 1.0;
if (map.Resolution != 0.0)
ratio = resolution / map.Resolution;
if (ratio == 1.0)
map.PanTo(mapPoint);
else
{
ESRI.ArcGIS.Client.Geometry.MapPoint mapCenter = map.Extent.GetCenter();
double X = (mapPoint.X - ratio * mapCenter.X) / (1 - ratio);
double Y = (mapPoint.Y - ratio * mapCenter.Y) / (1 - ratio);
map.ZoomToResolution(resolution, new ESRI.ArcGIS.Client.Geometry.MapPoint(X, Y));
}
} /Dominique
... View more
04-27-2010
05:23 AM
|
0
|
0
|
776
|
|
POST
|
Looks like there is a small issue in the sample because the first time the user selects an address, it's calling ZoomToResolution but this method is not supposed to center on the given point. If we try calling successively ZoomToResolution + PanTo, we run into trouble because these methods are asynchronous. There is already a thread about this issue (without definitive solution) http://forums.arcgis.com/threads/2269-Zoom-and-Pan-with-Address-locator Dominique
... View more
04-27-2010
03:11 AM
|
0
|
0
|
776
|
|
POST
|
Define the value of the renderer as Int32. xmlns:sys="clr-namespace:System;assembly=mscorlib"
........
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo Symbol="{StaticResource Line_Rood_Dik}" >
<esri:UniqueValueInfo.Value>
<sys:Int32>0</sys:Int32>
</esri:UniqueValueInfo.Value>
</esri:UniqueValueInfo>
<esri:UniqueValueInfo Symbol="{StaticResource Line_Rood_Dik}" >
<esri:UniqueValueInfo.Value>
<sys:Int32>1</sys:Int32>
</esri:UniqueValueInfo.Value>
</esri:UniqueValueInfo>
.......
</esri:UniqueValueRenderer.Infos> /Dominique
... View more
04-22-2010
06:53 AM
|
0
|
0
|
318
|
|
POST
|
You might use a custom line symbol and apply a TranslateTransform to this custom symbol. Something like : <esri:LineSymbol x:Key="TranslatedLineSymbol">
<esri:LineSymbol.ControlTemplate>
<ControlTemplate>
<Grid>
<Grid.RenderTransform>
<TranslateTransform X="5" Y="-5" />
</Grid.RenderTransform>
<Path x:Name="Element" Stroke="Blue" StrokeThickness="1" />
</Grid>
</ControlTemplate>
</esri:LineSymbol.ControlTemplate>
</esri:LineSymbol> /Dominique
... View more
04-21-2010
11:46 PM
|
0
|
0
|
972
|
|
POST
|
An OverviewMap shows one layer which is given by the layer property of the OverviewMap. This layer can be set by code or by XAML and doesn't need to be the same than the layers in the main map. <esriToolkit:OverviewMap x:Name="OVMap" Margin="0"
MaximumExtent="-180,-90,180,90" Map="{Binding ElementName=Map}">
<esriToolkit:OverviewMap.Layer>
<esri:ArcGISTiledMapServiceLayer Url="http://server.arcgisonline.com/ArcGIS/rest/service/ESRI_StreetMap_World_2D/MapServer" />
</esriToolkit:OverviewMap.Layer>
</esriToolkit:OverviewMap> So I guess you could set the overviewmap layer to your graphic layer. /Dominique
... View more
04-21-2010
01:11 AM
|
0
|
0
|
393
|
|
POST
|
Starting from a map application template, you can just add the code in MainPage.xaml.cs. Example of code displaying the earthquakes in california since 1950 as DynamicMapServiceLayer: public MainPage()
{
InitializeComponent();
System.Collections.ObjectModel.ObservableCollection<LayerDefinition> layerDefinitions;
ArcGISDynamicMapServiceLayer myMapServiceLayer = Map.Layers["California"] as ArcGISDynamicMapServiceLayer;
layerDefinitions = new System.Collections.ObjectModel.ObservableCollection<LayerDefinition>();
LayerDefinition layerDefinition = new LayerDefinition();
layerDefinition.LayerID = 2;
layerDefinition.Definition = "YEAR > 1950";
layerDefinitions.Add(layerDefinition);
myMapServiceLayer.VisibleLayers = new int[] { 2 };
myMapServiceLayer.LayerDefinitions = layerDefinitions;
} The MainPage.xaml must also be completed with the declaration of the dynamic service: <esri:ArcGISDynamicMapServiceLayer ID="California" Url="http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer" /> Note that this example is 'XAMLable'. Yo can get the same result without any C# code by modifying the .xaml file only:
<esri:ArcGISDynamicMapServiceLayer ID="California"
Url="http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer"
VisibleLayers="2" >
<esri:ArcGISDynamicMapServiceLayer.LayerDefinitions>
<esri:LayerDefinition LayerID="2" Definition="YEAR > 1950" />
</esri:ArcGISDynamicMapServiceLayer.LayerDefinitions>
</esri:ArcGISDynamicMapServiceLayer> /Dominique
... View more
04-17-2010
02:38 AM
|
0
|
0
|
422
|
|
POST
|
The problem is that ArcGISTiledMapServiceLayer is a DependencyObject and not a FrameworkElement. With Silverlight 3, a property must be a FrameworkElement dependency property in order to be a binding target. Your code should work by reversing the binding: <Slider x:Name="slider1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Maximum=".7" LargeChange="0.1" SmallChange="0.05" Minimum=".1"
Value="{Binding ElementName=map1, Path=Layers[1].Opacity, Mode=TwoWay}" />
<esri:Map Background="White" Grid.Row="1" HorizontalAlignment="Stretch" Margin="0,0,0,0" Name="map1" VerticalAlignment="Stretch" >
<esri:Map.Layers>
<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:ArcGISTiledMapServiceLayer ID="TopoMap" Opacity="0.1" Url="http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer" />
</esri:Map.Layers>
</esri:Map> Dominique
... View more
04-16-2010
01:18 AM
|
0
|
0
|
355
|
|
POST
|
The LayerDefinitions property (ArcGISDynamicMapServiceLayer class) allows you to define queries by sublayer of your service. Example : layerDefinitions = new System.Collections.ObjectModel.ObservableCollection<LayerDefinition>();
LayerDefinition layerDefinition = new LayerDefinition();
layerDefinition.LayerID = 0;
layerDefinition.Definition = "subtype = 2";
layerDefinitions.Add(layerDefinition);
myMapServiceLayer.LayerDefinitions = layerDefinitions;
Dominique
... View more
04-15-2010
04:06 AM
|
0
|
0
|
422
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM | |
| 1 | 09-07-2021 03:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|