1

I'm using Mapbox with Leaflet to retrieve WMS and ArcGIS tiles. I have added the ability to retrieve attributes from the WMS servers and ArcGIS servers with WMS capabilities turned on. I would like to have the mouse cursor change to a pointer when hovering over a feature to show that it's clickable. How do I do this?

1 Answer 1

4

I would like to have the mouse cursor change to a pointer when hovering over a feature to show that it's clickable. How do I do this

You can't do this when all you have is a WMS layer. The WMS provides images not features. You can make a WMS layer queryable and when you have a queryable layer then the whole map will be clickable ~ you will need to perform a GetFeatureInfo request and, simply speaking, information from the features that act as the data source for the map at that point will be retrieved.

You can have a WMS service that supplies many layers and have it so that some of the layers are queryable and others not.

You can have your pointer change if the active layer is queryable, and you may want to do this if you don't want users to have the ability to query multiple layers in one click, but that's not the same as changing the mouse icon for clickable features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.