Select to view content in your preferred language

Very interesting problem

2636
7
06-05-2012 12:00 PM
JaredWhite
Regular Contributor
I have a map service that I recently decided to run cached. Here are the problems presented by it.
I'm running server 10.1, GIS Desktop 10.1 and Silverlight 5
When my cached service is set in my silverlight ap to ArcGISDynamicServiceLayer, it works.
When it is set to ArcGISTiledServiceLayer in a silverlight app that doesn't have any other tiled layers, it works.
When it is set to tiled in a silverlight app with other tiled layers (e.g.: any esri map service), it fails to display, though the other map services do.
If i set it as a later in the ESRI Silverlight Viewer program, it plays nice with all other maps and works like a charm.
What could be causing this?
0 Kudos
7 Replies
LanceCrumbliss
Frequent Contributor
I have a map service that I recently decided to run cached. Here are the problems presented by it.
I'm running server 10.1, GIS Desktop 10.1 and Silverlight 5
When my cached service is set in my silverlight ap to ArcGISDynamicServiceLayer, it works.
When it is set to ArcGISTiledServiceLayer in a silverlight app that doesn't have any other tiled layers, it works.
When it is set to tiled in a silverlight app with other tiled layers (e.g.: any esri map service), it fails to display, though the other map services do.
If i set it as a later in the ESRI Silverlight Viewer program, it plays nice with all other maps and works like a charm.
What could be causing this?




The first layer in the map determines the maps spatial reference.  If your mapservice is in the map as a tiled mapservice and its spatial reference doesn't match the first layer, it wont display.  If it's added as an ArcGISDynamicServiceLayer it will reproject.  If it's the only layer, then obviously it will display. 

The ESRI Silverlight Viewer program may actually be detecting that your tiled layer's spatial reference does not match that of the map, and inteligently switch it to an ArcGISDynamicServiceLayer instead.  That's just a guess.

Lance
0 Kudos
JoeHershman
MVP Alum
This relates back to why ESRI changed their standard to using Web Mercator from the original WGS.  In order for multiple tiled services to display together they must use the same tiling scheme so in order to use Bing, Google, ESRI together they all needed to be based on the same spatial reference.
Thanks,
-Joe
0 Kudos
JaredWhite
Regular Contributor
Thanks for your responses. I should have been more specific though, i followed the online caching tutorial on the server help page to the T, projected coordinate system is WGS 1984 Web Mercator (Auxiliary Sphere) and the tile template is the Bing/Google Earth/ Google Maps one that is recommended. The actual data projected is NAD27, but it's been run through NADCON to NAD83 and then projected to WGS84 Web Mercator using the NAD_to_WGS84_5 specs in ArcDesktop. I guess that's where I started thinking the problem was weird, that and the fact that it runs perfectly on the Silverlight Viewer as a tiled service.
0 Kudos
JaredWhite
Regular Contributor
Can anybody figure this out? It's projected correctly onto wgs 84 Web Mercator but still not playing nice with esri map services if published in a simple silverlight program, but works fine if published through silverlight viewer.
0 Kudos
JenniferNery
Esri Regular Contributor
Hmm Silverlight Viewer use a later version of the API (I think v2.4). "minerjoe" is correct though:
multiple tiled services to display together they must use the same tiling scheme
. I'd be curious to see if using Silverlight4 and API v2.4 will be any different. Could you try that?
0 Kudos
JaredWhite
Regular Contributor
Tried with a simple silverlight app both api 2.4 sl4 and api 2.4 sl5 before i posted. I'm wiping my server now and republishing the maps from scratch, we'll see if the problem persists.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
SL API doesn't support displaying tiled layers that are not in the same spatial reference as the map.

The first tiled layer defines automatically the Spatial Reference of the map, then others tiled layers that doesn't fit that SR are not displayed.
That's because tiled layers use pregenerated cached tiles that are only valid in the layer SR.


But instead of ArcGISTiledMapServiceLayer you can use ArcGISDynamicMapServiceLayer. In this case the projection is done on the fly by the server (but take care of the performance impact).
The Silverlight Viewer is doing that for you. If you add a cached tiled service URL that doesn't fit the map SR, an ArcGISDynamicMapServiceLayer is added. If the SR is OK, an ArcGISTiledMapServiceLayer is added.

Hope this helps.
0 Kudos