Select to view content in your preferred language

switching tiledmaplayer problem

925
5
06-13-2012 04:59 AM
bayramüçüncü
Deactivated User
hi,
I wanna switch tiledmaplayer of my Map but, can not.

The spatial references are here.

1. Arcgis 9.3.1

Spatial Reference: PROJCS["Transverse Mercator",GEOGCS["GCS_D_ITRF_1996",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",30.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

2. Arcgis 10

Spatial Reference: PROJCS["WGS_1984_UTM_Zone_35N",GEOGCS["GCS_WGS_1984",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",30.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]



In arcgis server sample applications site, the spatial references are not like mine, they are numeric codes.
for example
Spatial Reference: 102100 (3857)

do you think the issue is about spatial reference, or arcgis server version problem?
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
As a tiledmaplayer drives the spatial reference of the map, you can't change that easily a tiledmaplayer if the spatial reference of the tiled layer changes (the spatial reference of the tiled layers must be the spatial reference of the map else the tiled layers don't show up).

The steps to do it are :
- clear all layers in the map : myMap.Layers.Clear();
- clear the extent (that will clear the map SR) : myMap.Extent = null;
- now you can add your new tiled layer : myMap.Layers.Add(myTiledLayer);

Note : before clearing the layers, you can store them in a private array so you can add them again at the end of the process
0 Kudos
bayramüçüncü
Deactivated User
As a tiledmaplayer drives the spatial reference of the map, you can't change that easily a tiledmaplayer if the spatial reference of the tiled layer changes (the spatial reference of the tiled layers must be the spatial reference of the map else the tiled layers don't show up).

The steps to do it are :
- clear all layers in the map : myMap.Layers.Clear();
- clear the extent (that will clear the map SR) : myMap.Extent = null;
- now you can add your new tiled layer : myMap.Layers.Add(myTiledLayer);

Note : before clearing the layers, you can store them in a private array so you can add them again at the end of the process


I understand, but this example did not clear all layers, but it works. The tiled maps are changed.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I understand, but this example did not clear all layers, but it works. The tiled maps are changed.


In the example you point out, all tiled layers are using the same spatial reference (102100).
The steps I gave are only useful to replace a tiled layer by a tiled layer in another spatial reference.
0 Kudos
bayramüçüncü
Deactivated User
In the example you point out, all tiled layers are using the same spatial reference (102100).
The steps I gave are only useful to replace a tiled layer by a tiled layer in another spatial reference.


Ok, are the spatial references different, that I gave above? or same?
[PHP]1. Arcgis 9.3.1

Spatial Reference: PROJCS["Transverse Mercator",GEOGCS["GCS_D_ITRF_1996",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",30.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

2. Arcgis 10

Spatial Reference: PROJCS["WGS_1984_UTM_Zone_35N",GEOGCS["GCS_WGS_1984",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",30.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]][/PHP]

these looks like same.
0 Kudos
JoeHershman
MVP Alum
Ok, are the spatial references different, that I gave above? or same?
[PHP]1. Arcgis 9.3.1

Spatial Reference: PROJCS["Transverse Mercator",GEOGCS["GCS_D_ITRF_1996",DATUM[
2. Arcgis 10

Spatial Reference: PROJCS["WGS_1984_UTM_Zone_35N",GEOGCS["GCS_WGS_1984",DATUM[

these looks like same.


The names are different, therefore, they are different.  Even though the other parameters may be the same

-Joe
Thanks,
-Joe
0 Kudos