Hi,
I am trying to create MultiPoint through ActionScript and want to add graphic on the map, but it throwing error,
TypeError: Error #1034: Type Coercion failed: cannot convert []@1022e3a1 to com.esri.ags.geometry.MapPoint.
at com.esri.ags.symbols::SimpleMarkerSymbol/draw()[C:\checkout\flex_api2\api\src\com\esri\ags\symbols\SimpleMarkerSymbol.as:406]
at com.esri.ags::Graphic/drawWithSymbol()[C:\checkout\flex_api2\api\src\com\esri\ags\Graphic.as:496]
at com.esri.ags::Graphic/commitProperties()[C:\checkout\flex_api2\api\src\com\esri\ags\Graphic.as:452]
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()
can any one please suggest me what is the problem in this code to add graphic on the layer .
Here is my Code.
var myMulPoint:Multipoint = new Multipoint(
[[
new MapPoint(1447100, 7477200),
new MapPoint(1447100, 7477200),
]], new SpatialReference(102100));
var myGraphicMulPoint:Graphic = new Graphic();
myGraphicMulPoint.geometry = myMulPoint;
myGraphicMulPoint.symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_TRIANGLE, 22, 0x009933);
myGraphicsLayer.add(myGraphicMulPoint);
I am trying to create MultiPoint through ActionScript and want to add graphic on the map, but it throwing error,
TypeError: Error #1034: Type Coercion failed: cannot convert []@1022e3a1 to com.esri.ags.geometry.MapPoint.
at com.esri.ags.symbols::SimpleMarkerSymbol/draw()[C:\checkout\flex_api2\api\src\com\esri\ags\symbols\SimpleMarkerSymbol.as:406]
at com.esri.ags::Graphic/drawWithSymbol()[C:\checkout\flex_api2\api\src\com\esri\ags\Graphic.as:496]
at com.esri.ags::Graphic/commitProperties()[C:\checkout\flex_api2\api\src\com\esri\ags\Graphic.as:452]
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()
can any one please suggest me what is the problem in this code to add graphic on the layer .
Here is my Code.
var myMulPoint:Multipoint = new Multipoint(
[[
new MapPoint(1447100, 7477200),
new MapPoint(1447100, 7477200),
]], new SpatialReference(102100));
var myGraphicMulPoint:Graphic = new Graphic();
myGraphicMulPoint.geometry = myMulPoint;
myGraphicMulPoint.symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_TRIANGLE, 22, 0x009933);
myGraphicsLayer.add(myGraphicMulPoint);