Select to view content in your preferred language

SFV 1.0, Web Mercator base maps:  Locate and Banner in 102100 rather than 4326

3152
10
04-14-2010 05:01 AM
ThomasBrophy
Regular Contributor
All,
I have moved to the web mercator base maps, the locate no longer works and the xy in the banner displays in 102100 rather than 4326.

I am in the same situation that Bobby was in at his post, "Locate and Web Mercator "
http://forums.esri.com/Thread.asp?c=158&f=2421&t=300183&mc=7#msgid938108

I have implemented,

1.)  "New Locate Widget for Sample Viewer that Pojects Results" from:
http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=16359

2.)  "Project Mouse Coordinates on MouseOver" forum by Robert Scheitlin from:
http://forums.esri.com/Thread.asp?c=158&f=2421&t=300161&mc=8


*** Problem:
Using the  2.), the banner is working in WGS84 (4326).  -77.000, 38.000
Using the  1.), The geocode address works.

When I use xy locate at -77.000, 38.000:  The livemaps layers get very small (1:1,128), and in relation to those layers, the point is right - but according to the application banner it is 0.000,0.000.  Weird!



I should note that I am using the "Shortcut Menu and Coordinate Display in the Banner (Combine.zip)" by Robert Scheitlin from forum:
http://forums.esri.com/Thread.asp?c=158&f=2421&t=301764&mc=4


Can anyone tell me what I am missing?
Thomas Brophy



---------------------------------------------------------------------------
LocateWidget3.xml code change:
<inspatial>4326</inspatial>
<outspatial>102100</outspatial>
---------------------------------------------------------------------------
LocateWidget3.mxml code change:
Line: 133

     inSpatial = configXML.inspatial || 4326;
     outSpatial = configXML.outspatial || 102100;
---------------------------------------------------------------------------
Banner.mxml code change:
Line 75:

//Original code  
   /*
   private function mouseMoveHandler(event:MouseEvent):void
   {
    const mapPoint:MapPoint = _map.toMapFromStage(event.stageX, event.stageY);
                mapXY = "Long: "+ mapPoint.x.toFixed(4) + ", Lat: " + mapPoint.y.toFixed(4);
            }
            */
//Original code end
           
//Project Mouse Coordinates on MouseOver fix
   private function mouseMoveHandler(event:MouseEvent):void
   { 
    const mapPoint:MapPoint = _map.toMapFromStage(event.stageX, event.stageY); 
    const nMPnt:MapPoint = WebMercatorUtil.webMercatorToGeographic(mapPoint,true) as MapPoint;
    mapXY = "X: "+ nMPnt.x.toFixed(4) + ", Y: " + nMPnt.y.toFixed(4);
   }          
//Project Mouse Coordinates on MouseOver fix end
---------------------------------------------------------------------------
0 Kudos
10 Replies
ThomasBrophy
Regular Contributor
I just got back from a trip. Everything works great!  Thanks again.
0 Kudos