Select to view content in your preferred language

Adding Tiled Map services of different spatial reference

2156
9
06-17-2010 11:40 AM
NeelMallepally
Emerging Contributor
I am trying to add two TiledMapservices of different spatial reference to a map object. Only the layer whichever I add first is showing.
How to make both layers to appear?
Any help would be appreciated.

Thanks
0 Kudos
9 Replies
TylerMunn
Emerging Contributor
I am trying to add two TiledMapservices of different spatial reference to a map object. Only the layer whichever I add first is showing.
How to make both layers to appear?
Any help would be appreciated.

Thanks


<esri:Map.Extent>
                <esriGeometry:Envelope XMin="-80.5" YMin="43" XMax="-78.5" YMax="44">
                    <esriGeometry:Envelope.SpatialReference>
                        <esri:SpatialReference WKID="4326" />
                    </esriGeometry:Envelope.SpatialReference>
                </esriGeometry:Envelope>
            </esri:Map.Extent>

set spatial reference WKID to that of your tiled map layer, note that your X and Y value will need to be changed
0 Kudos
dotMorten_esri
Esri Notable Contributor
I am trying to add two TiledMapservices of different spatial reference to a map object. Only the layer whichever I add first is showing.
How to make both layers to appear?


You cannot mix tiled layers of different spatial reference together. They basically wouldn't overlap correctly. It's the projection's equivalent of mixing Miles and Kilometers together.
You can set the second layer to be an ArcGISDynamicMapserviceLayer. ArcGIS dynamic services can reproject on the fly and thereby match the baselayer's spatial reference. Of course you won't get the performance benefit of the cache layers, but that is the tradeoff you are making.
0 Kudos
TylerMunn
Emerging Contributor
Is it an issue having 2 tiled layers if they are the same spatial reference? IE bing maps, and a tiled layer of my own
0 Kudos
NeelMallepally
Emerging Contributor
You cannot mix tiled layers of different spatial reference together. They basically wouldn't overlap correctly. It's the projection's equivalent of mixing Miles and Kilometers together.
You can set the second layer to be an ArcGISDynamicMapserviceLayer. ArcGIS dynamic services can reproject on the fly and thereby match the baselayer's spatial reference. Of course you won't get the performance benefit of the cache layers, but that is the tradeoff you are making.


I have used Javascript API previously in which I was able to  add two tiled layers of different WKID (4326 and 4269) and two layers were visible.

You can set the second layer to be an ArcGISDynamicMapserviceLayer
. Do you mean changing the Tiled Map Service to Dynamic on the server or declaring the layer as Dynamic layer in my web app?

Thanks
0 Kudos
dotMorten_esri
Esri Notable Contributor
Even though your service is published as tiled, you can still use it as a dynamic layer on the client.

I don't think the JS API validates the spatial reference of the two layers and lets you do it. In this case the two spatial reference are very close (usually 100-500 feet error), so you might not have noticed the misalignment. That doesn't mean it's right to do it though 🙂
0 Kudos
NeelMallepally
Emerging Contributor
Even though your service is published as tiled, you can still use it as a dynamic layer on the client.


It worked. Thanks a lot.
0 Kudos
JonGottsegen
Deactivated User
I know this thread is a bit dated, but I've been having trouble getting a tiled and dynamic service to appear in a flex app. I did the trick of treating the tiles service as a dynamic one, and that worked, but it's not optimal as Sharp said. The tiled and dynamic services are the same spatial reference (26913), but not the same extents. In addition, the tiled service has multiple layers.

Any help in treating the tiled service as tiled and displaying it with a dynamic service would be appreciated.
0 Kudos
JenniferNery
Esri Regular Contributor
Did you say you are working on Flex app? If so, you may want to post your question here: http://forums.arcgis.com/forums/18-ArcGIS-API-for-Flex
0 Kudos
JonGottsegen
Deactivated User
Thanks. I got to this thread through a search for displaying tiled and dynamic services and didn't notice it was the Silverlight forum.....
0 Kudos