Answer the question
In order to leave comments, you need to log in
How to fix onmouseover over a separate road in Leaflet.js?
Hello!
The map has a layer of roads
var roads_layer = L.geoJson.ajax('http://192.168.5.155:8000/roads.geojson', {
}).addTo(mymap);
roads_layer.on('mouseover', function(e) {
this.setStyle({
color: 'orange'
});
});
changes the appearance of the entire layer. How to catch a separate road when hovering the mouse?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question