How to change the TiledMapServiceLayer's spatialReference?

896
2
03-30-2017 02:09 AM
FangBen
New Contributor

  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
New Contributor

Thank you very much!

0 Kudos