I can successfully create a point in a FeatureLayer by using actionscrip. But I can't create a line in the same way.Is there any questions? The code is this: 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);
It isn't success. So I can't solve the problem. Please help me! Thanks!