Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to use a basemap containing world map data as a backdrop to some point and outline data that I'm hosting in ArcGIS server in the ESRI Flex API, but I would like the map control to share a WKID with my data, so I don't need to reproject it on every operation. However, the Map control seems to want a) the layers to be displayed with the first being on the bottom, and b) the first layer to be the layer that defines the WKID. Is there a good way to work around these contraints?

share|improve this question
did this work for you? I get an error on flex 2.2 viewer when using this code – Brad Nesom Aug 4 '11 at 16:26
up vote 1 down vote accepted

According to the docs, you can't set SpatialReference directly. Instead, set the extent property on the Map object.

<esri:Map id="map" units="{Units.FEET}">
        <esri:Extent xmin="661140" ymin="-1420246" xmax="3015668" ymax="1594451">
            <esri:SpatialReference wkid="26777"/>
            <!-- NAD_1927_StatePlane_Kansas_North_FIPS_1501 -->
    <esri:ArcGISDynamicMapServiceLayer url=""/>
    <esri:ArcGISDynamicMapServiceLayer url=""/>
share|improve this answer

An alternative way to workaround the (a) and (b) constraints you mention is to re-order the layers once the first layer is loaded (and has set the map spatial reference).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.