Hi all,I'm working on my first project with the ArcGIS Flex API and am running into some strange behaviour when I use lat/long values with the 4326 spatial reference.The code I'm using for my map is as follows:
<esri:Map id="tourMap" width="640" height="680" top="120">
<esri:extent>
<esri:Extent xmin="16353106" ymin="-4312229" xmax="16356164" ymax="-4308981">
<esri:SpatialReference wkid="102100" />
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:GraphicsLayer id="markerLayer"></esri:GraphicsLayer>
</esri:Map>
and I'm trying to place a marker as follows:
private function addMarkers():void {
// -36.076790, 146.918888
// var marker:Graphic = new Graphic(new MapPoint(16354964, -4310639, new SpatialReference(102100)), new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE));
var marker:Graphic = new Graphic(new MapPoint(146.905971, -36.069367, new SpatialReference(4326)), new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE));
markerLayer.add(marker);
}
I'm finding using the 102100 spatial reference, the marker is place correctly, however the marker using 4326 spatial reference is being placed in the centre of the map every time, no matter what long/lat values I use.I've also found that when I use the 4326 spatial reference to set the map extent values, the map always shows "map data not available".Any help with this would be much appreciated!Thanks very much in advance,Alastair