How to define initExtent with two layers from different coordinate systems

594
2
06-30-2011 12:42 PM
CharlesGeiger
New Contributor III
Newbie question:  I want to combine my data, in PA State Plane South ("wkid":2272) coordinates, with a Bing maps layer (sample code shows "wkid":102100).  So far, if I use ("wkid":2272) and my PA initial extent, I end up in Africa.  Can it be done?  If so, how do I specify the initExtent parameter?
0 Kudos
2 Replies
CharlesGeiger
New Contributor III
It's alright.  I found the answer in the JavaScript API Reference [it's Extent, not initExtent]:
"If provided, the extent and projection of the map is set to the properties of Extent. Once the projection is set, all layers must be able to be drawn in the defined projection. The tiling scheme of an ArcGISTiledMapServiceLayer must match the projection of the map."  so, I can't overlay my data with a tiled map service unless that map service is also in Pennsylvania State Plane coordinates.
0 Kudos
JeffPace
MVP Alum
Thats correct.  so you have 3 options

1: Draw your PA data dynamically and let it reproject on the fly
2: Reproject your PA data to 102100
3: Leave your PA data as State Plane, but change the coordinate system of the Data Frame (in the mxd) to 102100.  Then recache your data.  Caching will be slower (due to the reprojection) but the data can remain State Plane, and the web app will still be fast due to cached data.

We choose option 3, our data are all in florida State Plane, but all our dataframes are 102100 so it is compatible with ArcGIS Online/Bing/Google.
0 Kudos