Is it possible to implement a custom geometry collection method?

1221
1
06-05-2012 08:08 AM
JohnWilkinson1
New Contributor
Using ArcGIS Mobile Windows Application 10.0:

I am trying to implement a custom geometry collection method.  In certain situations the user may elect to use the coordinates of a previously added feature.  I'm trying to allow them to do so, by either implementing a custom method or by modifying an existing method, but am having no luck.

Mobile Help has a heading "Customizing available geometry collection methods" for "removing an existing geometry collection method or adding a custom geometry collection method".  (http://help.arcgis.com/en/arcgismobile/10.0/sdk/help/index.html#/Customizing_available_geometry_coll...) The content of the help doesn't show how to do this for CreatingGeometryCollectionMethods -- only code for GeometryCollectionStarted and GeometryCollectionCompleted, which happen later.

I am able to add a custom method in CreatingGeometryCollectionMethods though, and it appears as a button on the default "Add Inventory - Choose a geometry collection method" page.  However, the button is blank, and there appears to be no way to set its text:  the set of the Name property (which appears to be used for the default methods on GeometryCollectionMethod) is not accessible.

I am able to get the SketchGeometryPage from the SketchGeometryCollectionMethod, and set the geometry of its feature, but the page does not recognize that the geometry has been captured (clicking on Accept on the sketch page after setting the geometry gives a popup "Invalid point geometry.  Requires at least one coordinate.").  The set accessors of the Feature and Geometry properties on GeometryCollectionMethod, like the name property, are also not accessible.

I've read from a previous post that adding a geometry collection method is possible:  (http://forums.arcgis.com/threads/19440-Potential-Bug-in-ArcGIS-Mobile), though there was no description of how it was done.

Is it possible to customize geometry collection?  Am I missing something, or are the set properties of GeometryCollectionMethod not accessible?

John
0 Kudos
1 Reply
AkhilParujanwala
New Contributor III
Yes it is possible to implement custom geometry collection.

I have done it in two different ways.
1) Take the existing Geometry Collections methods and added my code in between, where certain events I was able to access. This worked well until my needs vastly grew outside of the given collection tools.

Then I wrote my own code to perform data collection.
2) I have buttons on the interface, if they click By Map, then the screen will turn to a static copy of the home page, which will allows the user to click on the map to indicate where the point should be. Then click ok, go to the attributes form, fill that in, then click ok, to save the point, and synchronize the data.
I can also get the geometry from a GPS, instead of having the user to select where the point is on the map.

All of the classes are there, SketchGeometry and AttributesForm and etc.
0 Kudos