var arr:Array = []; var pointarr:Array = []; var point1:MapPoint = new MapPoint(120.43712353832049,31.17295183154354); point1 = WebMercatorUtil.geographicToWebMercator(point1) as MapPoint; pointarr.push(point1); var point2:MapPoint = new MapPoint(120.393407390551,31.21343211585429); point2 = WebMercatorUtil.geographicToWebMercator(point2) as MapPoint; pointarr.push(point2); var point3:MapPoint = new MapPoint(120.303107390551,31.21341211185429); point3 = WebMercatorUtil.geographicToWebMercator(point3) as MapPoint; pointarr.push(point3); var polyline:Polyline = new Polyline(); polyline.addPath(pointarr); var g:Graphic = new Graphic(); g.geometry = polyline; arr.push(g); var response:AsyncResponder = new AsyncResponder(myResultFunction,myFaultFunction); fea.applyEdits(arr, null, null,false,response);
Solved! Go to Solution.
Can you use a tool like HttpFox to see what the response from the server is?
polyline.spatialReference = new SpatialReference(102113);
Can you use a tool like HttpFox to see what the response from the server is?
polyline.spatialReference = new SpatialReference(102113);
Projects coordinates between 4326 (GCS_WGS_1984) and 102100/3857 (WGS_1984_Web_Mercator_Auxiliary_Sphere) coordinate systems. Useful when showing data defined in geographic coordinates on top of a Web Mercator based map.