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

'Hovering' getFeatureInfo #48

Open
willemvanopstal opened this issue Jun 24, 2017 · 1 comment
Open

'Hovering' getFeatureInfo #48

willemvanopstal opened this issue Jun 24, 2017 · 1 comment

Comments

@willemvanopstal
Copy link

I'd like to recreate this example (http://leafletjs.com/examples/choropleth/) with a WMS layer in stead of a geoJSON.

Is it possible to let the user hover his mouse over the rastercells, get the FeatureInfo and display this into the infobox?

The featureinfo is only capable of responding in application/json.

@apdevelop
Copy link

You can subscribe to mousemove map event, use some kind of deferred/debounce logic for limiting request rate and finally call identify function of wms.Source, passing MouseEvent event data. The response can be processed using your own override of showFeatureInfo function (it depends on response format of WMS service and desired info UI behavior).

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

2 participants