Greetings Everyone,
I have been struggling to figure out how to perform a spatial test on a graphics layer and a featureset.
What I am trying to do is extend the graphical search functionality in the search widget so that a user can press the ???A??? key and add additional features to both the graphics layer and the RecordData class object.
I have figured the main functions for this extension but now I am finding that if the added features overlap the existing graphics layer then duplicates will be produced in both the graphics layer and the RecordData class object.
To overcome this problem, I would like to use compare the existing in map graphicslayer to the new featureset that is produced when an additional graphical query is made. I think I am looking to use a GeometryService.relation method with the spatialRelationship parameter set to SPATIAL_REL_RELATION. However I have no Idea how to set up the comparisonString.
I???ve tried to jump into the Shape Comparison Language documentation but I must admit that it is completely over my head. I have tried my best to generate the correct parameters but I am obviously doing something wrong. Here is what I???ve got:
myGeometryService.relation(compareArray1, compareArray2,GeometryService.SPATIAL_REL_RELATION,"compareArray1 != compareArray2")
The Error I get whilst running this method is:
[FaultEvent fault=[RPC Fault faultString="Object reference not set to an instance of an object." faultCode="500" faultDetail="Unable to perform the relation operation"] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2]
Does anyone know what I may be doing wrong?
Thanks
Tyler Waring