Select to view content in your preferred language

Map Extent

868
7
07-16-2010 10:08 AM
TonyAlmeida
MVP Regular Contributor
I need some help with my projects map extent please. From what i know first layer with a valid spatial reference defines the spatial reference for the map. I have multipule Tiled layers and Dynamic layers. I have tried to define the initial map extent and spatial reference but with the current xaml i only see the State of Calfiornia and ESRI_ShadedRelief_World_2D, but i have some RadioButtons with other layers that don't show when i click on them. How can i get them all to show?
0 Kudos
7 Replies
TonyAlmeida
MVP Regular Contributor
Here is my current xaml.

Thanks.
0 Kudos
TonyAlmeida
MVP Regular Contributor
Here is my current xaml in text format.

Thanks
0 Kudos
RobertBurke
Esri Contributor
Is the Zip a txt file or is the text in the zip?  I couldn't open the zip.
Rob Burke
0 Kudos
TonyAlmeida
MVP Regular Contributor
the text is in the zip, weird i just download it and it opened just fine. xaml had to many characters so i had to zip it up cuz text file was to big.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
It's because your other layers which are displayed with the radio buttons are not using the same spatial reference that the map.

Spatial reference of http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_ShadedRelief_World_2D/MapServer is WGS84 (4326) --> Working

Spatial reference of http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer is WebMercator (102100) --> Not working

You can't display tiled layer which are not in the same Spatial reference than the map (and you can't change the spatial reference of a map after it's initialized).

Then you have to decide if you'd rather to use 4326 or 102100 and select the corresponding tiled services.
0 Kudos
TonyAlmeida
MVP Regular Contributor
dbroux i figured that out this morning. So in order for you to display your own data (WGS84) with some of the tiles ESRI has you would have to change the spatial reference of own data
0 Kudos
dotMorten_esri
Esri Notable Contributor
...and you can't change the spatial reference of a map after it's initialized...


Actually with v2.0 you can now (you have to clear the layers collection first though)
0 Kudos