This has been discussed in the thread, see above. Draw corrected the source code, either download the zip file again or follow rzufelt's correction to fixed the typo in the source.
<coordinateSystem name="GCS WGS 1984 (Decimal Degrees)" wkid="4326" decimals="9" />
Brilliant! Drew thank you so much.
Two quick questions (hopefully):
1. Is there a way to have the "Go to Coordinates" window preload when the application starts instead of 'Live Coordinates'? Can I just copy the widget and comment out everything but the 'Go to Coordinates' functionality?
Many thanks, again!
<viewer:WidgetTemplate open="{this.graphicsLayer.visible = true; }" closed="{this.graphicsLayer.visible = false; }" id="wTemplate" width="400" height="235" visible="false">
private function init():void
{
//Set Helper
this.helper = new CoordinateMenuWidgetHelper(configXML,map);
//SET Mouse Event Handlers
this.map.addEventListener(MouseEvent.MOUSE_MOVE, onMapMouseMove);
this.map.addEventListener(MouseEvent.CLICK, onMapMouseClick);
//Add GraphicsLayer to map
this.graphicsLayer.symbol = new SimpleMarkerSymbol("circle",10,0xFF0000);;
this.map.addLayer(this.graphicsLayer);
// add additional contex menu for projected coords.
if (this.helper.coordinateSystems.length == 0)
{
btnProject.visible = false;
btnProject.includeInLayout = false;
}
goToCoordinate.show(configXML,map);
}
Hi Rhett -
I've been plugging along to get the 'Go to XY' widget working as a standalone. I'm slowly learning as I go, but running into a small issue.
Once I launch the "widget" and then close it, the widget 1. doesn't lose focus in the widget panel (ie: the white underline is still below the icon), and 2. it won't re-open. See the on close attachment.
Do you know of a quick function/command/something-er-rather to add to the s:TitleWindow to get it to reset? It only resets if I re-launch the applicaiton.
Many thanks, Meg
protected function widgetConfigLoadedHandler(event:Event):void { if (configXML) { //Set Helper this.helper = new CoordinateMenuWidgetHelper(configXML,map); // Map mouse move event handler - captures XY this.map.addEventListener(MouseEvent.MOUSE_MOVE, onMapMouseMove); //Hide ESRI About Menu Items hideESRIMenuItems(); // Load context Menu items. createContextMenu(); } else { //Show error if XML fails. Alert.show("There was an error loading the widget configuration XML file ( CopyXY Widget )"); return; } \\My Add this.goToCoordinates.show(configXML,this.map); }