I have a wpf app with an ArcGIS map, I used the extent property to zoom and pan to Canada (the location I want) and added the pins (images) by adding a graphics layer, see code below.
currently I'm using this map: http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer
I'd like to use this instead: http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer
the problem is that the pins show up in the middle of the map, the 0,0 location, when I switch to the new map. Are graphics specific to a type of maps or am I adding graphics the wrong way? What's the best way to add images to map?
Thanks, T
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<esri:PictureMarkerSymbol x:Key="PushPin"
OffsetX="11"
OffsetY="39"
Source="pushpin.png" />
</Grid.Resources>
<esri:Map x:Name="MyMap"
Extent="-125, 40, -60, 60">
<esri:Map.Layers>
<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />
<esri:GraphicsLayer>
<esri:GraphicsLayer.Graphics>
<!-- Halifax -->
<esri:Graphic Symbol="{StaticResource PushPin}">
<esri:MapPoint X="-63"
Y="45" />
</esri:Graphic>
<!-- Toronto -->
<esri:Graphic Symbol="{StaticResource PushPin}">
<esri:MapPoint X="-79.5"
Y="44" />
</esri:Graphic>
<!-- Vancouver -->
<esri:Graphic Symbol="{StaticResource PushPin}">
<esri:MapPoint X="-123"
Y="49.5" />
</esri:Graphic>
</esri:GraphicsLayer.Graphics>
</esri:GraphicsLayer>
</esri:Map.Layers>
</esri:Map>
</Grid>
