Select to view content in your preferred language

polygon pointcollection

1594
2
Jump to solution
01-21-2017 06:28 AM
AmadouGuisse
Deactivated User

How do you find the number of points in a polygon? PointCollection is the object in ArcGIS api for Silverlight. This object is not working in ArcGIS api for javascript 3.19

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Here's one way to do it. Given a polygon (feature), this returns the point count for each of a polygon's rings

for (var i; i < feature.geometry.rings.length; i++) {
   console.log("Ring" + i + ": " + feature.geometry.rings[i].length + " points");
}

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

Here's one way to do it. Given a polygon (feature), this returns the point count for each of a polygon's rings

for (var i; i < feature.geometry.rings.length; i++) {
   console.log("Ring" + i + ": " + feature.geometry.rings[i].length + " points");
}
AmadouGuisse
Deactivated User

It works. Thanks.

I am converting an ArcGIS api for Silverlight application to ArcGIS api for JavaScript 3.19 using MVC5. Why is the JavaScript 3.19 intellisense not displaying properly? 

0 Kudos