Leaflet allows you to use .bindtooltip for geoJSON. Is it possible to access the tooltip options like {permanent: true, opacity: 0.5} etc when using this method?
// My JS
var layers_grid = L.geoJSON(false, {
style: function(feature) { return feature.properties}
})
.bindTooltip(function (layer) {
return layer.feature.properties.name;
}
).addTo(map);
// Later in the script
$.getJSON(url, function( data ) {
layers_grid.addData(data);
});
Edit: JSFiddle