Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Lately I've been going through ArcGIS JS API samples, but from what I've seen, it looks like all geometric functions always go through server, and use server side REST functions. There is no option to even calculate area of polygon using only JS API without server side funcions. Am I right, or is there something I'm missing here? I have a case, where I have feature layer added from JSON file and I want to use some geometric functions un features inside. Server connection is not an option, everything needs to be done on client side.

Is there a way to do this with ArcGIS JS API only, without using server side tasks? Or maybe some other alternative frameworks, that could use features from JSON file?

share|improve this question
2  
Can you list specifically what you'd like to do? –  Derek Swingley Apr 29 '13 at 1:52
    
Right now I'm only looking for area/distance measurements and intersection area calculation. Also, finding all object intersections from feature layer would be nice. Identify or something like that could be useful also. –  andree Apr 29 '13 at 7:47

1 Answer 1

up vote 7 down vote accepted

Checkout the utility functions in the esri.geometry namespace. You can do areas and lengths client side with functions from there. You can also do point-in-polygon client side with polygon.contains (also see extent.contains).

share|improve this answer
    
Thanks, thats what I needed. Are there also options for client-side idenfity function? –  andree Apr 29 '13 at 6:08
3  
No client side identify (which is querying across multiple layers). You can do basic querying on a per-layer basis if your query filter is by object ID, an extent or by time. More complex where clause querying is not available purely client side. –  Derek Swingley Apr 29 '13 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.