//map load complete private function mapLoadComplete(event:MapEvent):void { try { if (ExternalInterface.available) { var result:URLVariables = new URLVariables(); var urlSubstring:String = ExternalInterface.call("window.location.search.substring", 1); if (urlSubstring && urlSubstring.length > 0 && urlSubstring != "debug=true") { result.decode(urlSubstring); // Parse URL var xExt:String; var xUrlParam:String; var yLat:String; var xLon:String; var mScale:String; if (result["EXT"]) xExt = result.EXT; if (result["LAT"]) yLat = result.LAT; if (result["LON"]) xLon = result.LON; if (result["SCALE"]) mScale = result.SCALE; if(!yLat == "" && !xLon == "") { var spatRef:SpatialReference = new SpatialReference(4326); var cPoint:MapPoint = new MapPoint(parseFloat(xLon), parseFloat(yLat),spatRef); if(!mScale==""){ map.scale = parseInt(mScale); }else{ map.scale = 20000; } if (map.spatialReference.wkid != 4326) { map.cursorManager.setBusyCursor(); var geomServ:GeometryService = new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); geomServ.addEventListener(GeometryServiceEvent.PROJECT_COMPLETE,pResult); geomServ.addEventListener(FaultEvent.FAULT,pFault); geomServ.project([cPoint],map.spatialReference); function pResult(event:GeometryServiceEvent):void{ var pt:MapPoint = (event.result as Array)[0]as MapPoint; map.centerAt(pt); map.cursorManager.removeBusyCursor(); } function pFault(err:Object):void{ map.cursorManager.removeBusyCursor(); } } else{ map.centerAt(cPoint); } } if (!xExt == ""){ var extArray:Array = xExt.split(","); var extent:Extent = new Extent(Number(extArray[0]), Number(extArray[1]), Number(extArray[2]), Number(extArray[3]),map.spatialReference); map.extent = extent; } } } } catch (error:Error){} }
import com.esri.ags.events.GeometryServiceEvent; import com.esri.ags.geometry.MapPoint; import com.esri.ags.tasks.GeometryService; import com.esri.ags.geometry.Geometry;
I would like a field in our access database to contain a hyperlink that has co-ordinates in which in turn opens up a new webpage to the flexveiwer
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.