Select to view content in your preferred language

World_Topo_Map not being displayed in Flex api 1.3

522
1
11-02-2010 01:14 PM
BobThompson
New Contributor
I am doing the following in a flex application (using the ESRI 1.3 flex api) and the map does not display. The navigation control is listed as well as the ESRI logo/sign but the map is blank. The map has a spatial reference of 102100.

<esri:Map id="emap" level="2" load="init()" width="100%" height="100%">
<esri:ArcGISTiledMapServiceLayer visible="true" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
<esri:GraphicsLayer id="mapGraphicsLayer"
spatialReference="{new SpatialReference(102100)}" visible="true">
</esri:GraphicsLayer>
</esri:Map>


When I run the following the map displays as expected.

<esri:Map id="emap" level="2" load="init()" width="100%" height="100%">
<esri:ArcGISTiledMapServiceLayer visible="true" url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />
<esri:GraphicsLayer id="mapGraphicsLayer"
spatialReference="{new SpatialReference(4326)}" visible="true"> </esri:GraphicsLayer>
</esri:Map>


Note that the spatial reference is 4326.
I could not find an example of a map with a spatial reference of 102100 in the code samples at http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html

A review of the Flex api 2.0 does have code samples using the noted spatial reference of 102100.

Are map of this type not supported by the Flex 1.3 api??

Thanks,
Bob Thompson
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Bob,

   Is there some reason why you are explicitly setting the spatialReference of your graphics layer? Try eliminating that as the maps spatial reference gets set when the first layer is added to it.
0 Kudos