Hello, sumit ... I used the leaflet-geoman to display geojson data and it worked very well. Now my question is how to display a bootstraps modal (and not a popup) when the layer is clicked? What I've done so far is:
HTML
<body><div class="map" id="map"><!-- and all javascript libraries needed --><!-- modal div is here -->
`
App.Js
L.geoJson(geojsonPolygon ,{onEachFeature: function(feature, layer) {featureGroup.addLayer(layer);layer.on('click', function(e) {alert(layer.feature.properties.fid); //<-- alert success$('#modal').modal('show');//modal not show <----------------- Problem}); }}).addTo(map);
Hello, sumit ... I used the leaflet-geoman to display geojson data and it worked very well. Now my question is how to display a bootstraps modal (and not a popup) when the layer is clicked? What I've done so far is:
HTML
<body>
<div class="map" id="map">
<!-- and all javascript libraries needed -->
<!-- modal div is here -->
App.Js
L.geoJson(geojsonPolygon ,{
onEachFeature: function(feature, layer) {
featureGroup.addLayer(layer);
layer.on('click', function(e) {
alert(layer.feature.properties.fid); //<-- alert success
$('#modal').modal('show');
//modal not show <----------------- Problem
});
}
}).addTo(map);
Thanks..