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

Protobuf - Get clicked feature (or its geometry) #273

Open
treecon opened this issue Sep 2, 2022 · 0 comments
Open

Protobuf - Get clicked feature (or its geometry) #273

treecon opened this issue Sep 2, 2022 · 0 comments

Comments

@treecon
Copy link

treecon commented Sep 2, 2022

I am using vectorGrid.protobuf with .pbf tiles served from tileserver-gl.

While tiles are shown ok, and I also have access to feature properties using mouse events, I cannot get the geometry of the feature.

I have also tried e.layer.toGeoJSON() (e is a click event) but while method exists, it will produce an error (missing _latlngs property).

Any ideas?

P.S.1 Is there any way to use this package with .geojson (instead of .pbf) responses that tileserver-gl can also send?

P.S.2 Can I somehow handle all rendered features, e.g. as a GeoJSON? This way I could have access to their geometries using their IDs.

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