Select to view content in your preferred language

How to change the TiledMapServiceLayer's spatialReference?

998
2
03-30-2017 02:09 AM
FangBen
Deactivated User

  Hello,everybody!I have met a problem recently.

  I want to load two tiledMapServiceLayer with different spatialreference.But when i load one layer successfully,another layer would be loaded unsuccessfully.Here is the code of the tiledMapServiceLayer.

MapServiceLayer1.js

    Part.declare

    Part.getTileUrl

MapSerivceLayer2.js

     Declare:

code for change two layer:

Thank you for your suggestion!

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Fang,

  Because a tiled map services is just a collection of pre-generated image that get returned to the client there is NO way to change their spatial reference. For you to use multiple tiled map services they have to be in the same spatial reference and cached at the same scales.

FangBen
Deactivated User

Thank you very much!

0 Kudos