private function substitute(mapPoint:MapPoint):String [LEFT]{ var nf2:NumberFormatter = new NumberFormatter(); nf2.precision = 2; return StringUtil.substitute(m_template, nf2.format(mapPoint.x), nf2.format(mapPoint.y)); } [/LEFT]
Is there anyway to display MGRS (Military Grid Reference System) at the bottom instead of DMS/mercator?
include this code:map.addEventListener(MouseEvent.MOUSE_WHEEL, map_mouseMoveHandler);
directly under this line:map.addEventListener(MouseEvent.MOUSE_MOVE, map_mouseMoveHandler);
and the scale will refresh when you zoom in and out. Otherwise it is possible to zoom in and out and not have the scale refresh until you actually move the mouse pointer....
map.addEventListener(MouseEvent.DOUBLE_CLICK, map_mouseMoveHandler);so that it gets updated on double-click to zoom in also.
Is it possible to force the scale on the Coordinates widget to the same scale on the LODs on the Navigation widget?
Thanks
Daniel,
Sure something like this:private function map_mouseMoveHandler(event:MouseEvent):void { const mapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY); coords.text = m_func(mapPoint) + " Scale 1:" + String(map.scale * 3.2808398950131235); }
I can never remember if the right calculation is multiple or divide though.:o
Daniel,
Try this in the CoordinateWidget.mxml
private function map_mouseMoveHandler(event:MouseEvent):void { const mapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY); coords.text = m_func(mapPoint) + " Scale 1:" + map.scale.toString(); }