Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var L2 = new L.geoJson(L2, {
- style: function(feature) {
- return {
- color: 'black',
- weight: 7
- };
- },
- onEachFeature: function(feature, layer) {
- layer.on({
- 'mousemove': function(e) {
- e.target.setStyle({
- weight: 7,
- color: 'red'
- });
- },
- 'mouseout': function(e) {
- L2.resetStyle(e.target);
- },
- 'click': function(e) {
- mymap.fitBounds(e.target.getBounds());
- L2.bindPopup("<b>" + feature.properties.Nom);
- }
- });
- }
- }).addTo(mymap);
Add Comment
Please, Sign In to add comment