网络运营路测数据展示技术剖析之数据来源获取及投影
1、数据来源获取
数据源获取有多种方式:
1)通过ArcGIS桌面将业务数据库数据导出成ArcGIS要素类,这种方式是最原始的,也比较简单
2)通过AO程序自动将业务表读取到SDE数据库中,实现数据的自动后面导入,这个在后续博客中,也会和大家分享
3)通过WebService,从业务客户端,自动生成数据展现,这是这篇博客采用的方式
如下:
protected function map1_loadHandler(event:MapEvent):void{trace(2);//trace("lat-->" + arr[0].latitude);//trace("lng-->" + arr[0].longitude);//坐标投影for(var i:int=0;i<arr.length;i++){var lon:Number = arr[i].longitude as Number;var lat:Number = arr[i].latitude as Number;//var obj:Object = this.lonLat2Mercator({'x':lon,'y':lat});var myPoint:Geometry = new MapPoint(arr[i].longitude, arr[i].latitude,new SpatialReference(4326));points4326.addItem(myPoint);}projectNow(points4326.toArray());}//进行投影private function projectNow(mapPoints4326:Array):void{var outSR:SpatialReference = new SpatialReference(3857);// Note: GeometryService takes in geometries instead of graphics as inputgeometryService.project(mapPoints4326, outSR);}