Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please expose classifyRings() ? #74

Closed
vicb opened this issue Jun 26, 2020 · 1 comment
Closed

Could you please expose classifyRings() ? #74

vicb opened this issue Jun 26, 2020 · 1 comment

Comments

@vicb
Copy link

vicb commented Jun 26, 2020

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 with VectorTileFeature.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 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

@vicb
Copy link
Author

vicb commented Aug 26, 2020

I forked this repo to fix. See https://github.com/vicb/vector-tile.

@vicb vicb closed this as completed Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant