You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently classifyRing is only used internally to output geojson.
I have a use case where I do hit detection on a polygon so I have to duplicate this code to figure out if the hit is inside a polygon or inside a hole.
loadPolygons would return an array of polygons, the first one being the outer ring and the later would be the holes.
(loadPolygons would return null when called on a geometry that is not a polygon).
If you agree to expose that, I can update the code and the doc and send a PR.
Thanks
The text was updated successfully, but these errors were encountered:
Currently
classifyRing
is only used internally to output geojson.I have a use case where I do hit detection on a polygon so I have to duplicate this code to figure out if the hit is inside a polygon or inside a hole.
A nice way to expose it would be to create a
VectorTileFeature.prototype.loadPolygons
(to be consistent withVectorTileFeature.prototype.loadGeometry
.loadPolygons
would return an array of polygons, the first one being the outer ring and the later would be the holes.(
loadPolygons
would returnnull
when called on a geometry that is not a polygon).If you agree to expose that, I can update the code and the doc and send a PR.
Thanks
The text was updated successfully, but these errors were encountered: