Select to view content in your preferred language

on-the-fly projections api 2.0 vs 2.1 w/ Tiled Map Service

959
5
12-16-2010 06:15 PM
GregCorradini
Emerging Contributor
Hello,
Has anything changed from JS API 2.0 to 2.1 in regards to on-the-fly projections with TiledMapServiceLayers? Last time I checked only the dynamic map service layers used on-the-fly projections based on the map.spatialReference. Tiled map services didn't do on-the-fly projections. But this wep map is making me think that I missed something. As far as I can tell the only difference in the linked example is the 2.0 api. Was that feature supported in 2.0 with tiles?
0 Kudos
5 Replies
derekswingley1
Deactivated User
Hi Greg,

I put together the app you referenced. There's no on-the-fly projection of a tiled map service. What makes you think there is? Tiled map services cannot be re-projected on the fly via the web APIs.
0 Kudos
GregCorradini
Emerging Contributor
Thanks for the reply Derek,

That's what I thought. I don't understand how your toggling works then. Where in your code are you switching projections for the topo and streets tiles? They are in two different projections. I've walked through the execution but I'm missing something obvious then.
0 Kudos
GregCorradini
Emerging Contributor
duh. I see my mistake. I assumed your streets map service was coming from here (where mine was) and that service is GCS_WGS_1984. My bad. Thanks for the heads up and the code. I'm going to use a lot of it 🙂
0 Kudos
derekswingley1
Deactivated User
Glad to help, have fun!
0 Kudos