Select to view content in your preferred language

Query.geometry problem ('geometry' parameter is invalid)

1052
1
08-16-2011 08:44 AM
CoreySchafer
Deactivated User
I am having an odd problem with adding a geometry to a query. The geometry I am trying to add to this query is a little complex.

First, I add a bunch of graphics to a map. As I am adding them to the map, I push their geometry to an array so that I can buffer each of the graphics I just added.

Second, I buffer all of the graphics I have added to the map and use bufferParameters.unionResults=true so that my bufferResults come back as a single polygon (which is also a multipart polygon).

Third, I take the result of my buffer (which is a single multipart polygon) and use this as the geometry to another query. So pretty much, I want get features that are within the bufferzone of other graphics spread over the map. (For example, Hospitals within 1000 feet of schools).

This is working exactly how I want it to with lower buffer zones and a relatively low amount of graphics I'm buffering around. If I buffer 1000 feet around 500 schools, I get my results exactly how I would expect. However, if I add in more graphics to the mix and a higher buffer, I get some problems. For example, if I buffer 1000 feet around schools AND daycare facilities, I get results as expected, but if I buffer 2000 feet around schools AND daycare facilities, I get an error:

'geometry' parameter is invalid

I get this error when I try to plug in the buffer zones as the geometry for the query, so I am actually getting the buffer zones to work and they even show up on the map.

I actually found a sweet spot for the query geometry that is 1820 feet for multipart polygon. If I set it to 1820 its fine, if I set it to 1821 then I get the "'geometry' parameter is invalid" error.

Any ideas here? I was thinking perhaps I was getting more results back than my service allowed with the higher geometry, but this isn't the case. The total number I can get back is less than what I have my max set to.

Any help is appreciated...
Tags (2)
0 Kudos
1 Reply
MehulChoksey
Esri Contributor
Could you try validating the geometry returned from buffer for 1821 features using http://jsonlint.com
0 Kudos