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?
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.