<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Reshaping using geometryservice throws error Error: E0002E: Use a subclass instance in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641363#M14246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a geometryservice that reshapes a feature. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I select a feature then call the geometryservice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;myGeometryService.reshape(selectedGraphic.geometry,drawnLine)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first time I call the service it works fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I then select the same feature again then try and reshape it the event returns no geometry and gives 'exception thrown by getter' .. Error: E0002E: Use a subclass instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not using the edit widget and it is the version 2.5 of the flex API.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2012 00:55:18 GMT</pubDate>
    <dc:creator>Rodwaski</dc:creator>
    <dc:date>2012-04-19T00:55:18Z</dc:date>
    <item>
      <title>Reshaping using geometryservice throws error Error: E0002E: Use a subclass instance</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641363#M14246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a geometryservice that reshapes a feature. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I select a feature then call the geometryservice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;myGeometryService.reshape(selectedGraphic.geometry,drawnLine)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first time I call the service it works fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I then select the same feature again then try and reshape it the event returns no geometry and gives 'exception thrown by getter' .. Error: E0002E: Use a subclass instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not using the edit widget and it is the version 2.5 of the flex API.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 00:55:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641363#M14246</guid>
      <dc:creator>Rodwaski</dc:creator>
      <dc:date>2012-04-19T00:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping using geometryservice throws error Error: E0002E: Use a subclass instan</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641364#M14247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That error means you're using an instance of the Geometry base class rather than a Polygon etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 15:42:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641364#M14247</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2012-04-19T15:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping using geometryservice throws error Error: E0002E: Use a subclass instan</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641365#M14248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have changed it from a graphic.geometry to a polygon and it is still doing the same thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works the first time I reshape then when I select the feature, assign that to my selected graphic object and then try and reshape I get this error. Here is a code snippit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It returns the error on the reshapecompletehandler. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function reshapepolygon():void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.removeEventListener(MapMouseEvent.MAP_CLICK, map_mapClickHandler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reshapedrawTool.activate(DrawTool.POLYLINE); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; protected function reshape_drawEndHandler(event:DrawEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var drawnLine:Polyline = Polyline(event.graphic.geometry);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGeometryService.addEventListener(GeometryServiceEvent.RESHAPE_COMPLETE, reshapeCompleteHandler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myPolygon:Polygon = Polygon(selectedGraphic.geometry);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGeometryService.reshape(myPolygon,drawnLine) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reshapedrawTool.deactivate(); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addEventListener(MapMouseEvent.MAP_CLICK, map_mapClickHandler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; private function reshapeCompleteHandler(event:GeometryServiceEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("reshape Complete")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newAtttrs:* = ObjectUtil.copy(selectedGraphic.attributes);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myPolygon:Polygon = new Polygon;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myPolygon.rings = event.result.rings;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newGraphic:Graphic = new Graphic(myPolygon, null, newAtttrs);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; incidentsPolygonLayer.addEventListener(FeatureLayerEvent.EDITS_COMPLETE,editscomplete)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; incidentsPolygonLayer.applyEdits([ newGraphic ], null,incidentsPolygonLayer.selectedFeatures);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The geometryservice.reshapeLastResult is the same as the event returns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; com.esri.ags.geometry.Geometry (@afd16b9) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; defaultSymbol &amp;lt;exception thrown by getter&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; extent &amp;lt;exception thrown by getter&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; spatialReference null &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; type &amp;lt;exception thrown by getter&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The mypolygon and drawnline both seem to look OK.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 02:38:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641365#M14248</guid>
      <dc:creator>Rodwaski</dc:creator>
      <dc:date>2012-04-20T02:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping using geometryservice throws error Error: E0002E: Use a subclass instan</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641366#M14249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Rod,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried GeometryService.reshape() at my end with 2.5 api, it seems to working fine for me. Could you send me the complete test case/application or the full stack trace you have? Will be easier to debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Meanwhile, here's what i am doing in my resultHandler:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var reshapedPolygon:Polygon = event.result as Polygon;
var newGraphic:Graphic = new Graphic(myPolygon);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reshaping-using-geometryservice-throws-error-error/m-p/641366#M14249</guid>
      <dc:creator>SarthakDatt</dc:creator>
      <dc:date>2021-12-12T03:15:20Z</dc:date>
    </item>
  </channel>
</rss>

