I have difficulty adding code to customize actions/ events when clicking on a polygon using Leaflet web map.
The ultimate goal is not only showing that little pop-up but also a info slider HTML code to be added by my self. Currently I suspect this may be the place to add or change something but not really sure:
function pop_LotDrawing_2(feature, layer) {
layer.on({
mouseout: function(e) {
for (i in e.target._eventParents) {
e.target._eventParents[i].resetStyle(e.target);
}
},
mouseover: highlightFeature,
});
var popupContent = '<table>\
<tr>\
<td colspan="2"><strong>Lot</strong><br />' + (feature.properties['Lot'] !== null ? Autolinker.link(String(feature.properties['Lot'])) : '') + '</td>\
</tr>\
<tr>\
<th scope="row">Design</th>\
<td>' + (feature.properties['Design'] !== null ? Autolinker.link(String(feature.properties['Design'])) : '') + '</td>\
</tr>\
<tr>\
<th scope="row">Area (sqm)</th>\
<td>' + (feature.properties['Area (sqm)'] !== null ? Autolinker.link(String(feature.properties['Area (sqm)'])) : '') + '</td>\
</tr>\
</table>';
layer.bindPopup(popupContent, {maxHeight: 400});
Eventually, I want to realize something like this website: http://novieveshki.ru/map/