I would like to see the polygon label always as well if I zoom in.

This is the starting point. Zoom out

now, when I zoom in I want the lables still to be visible, but they are not. enter image description here

My current code is:

var comLayer = L.layerGroup([]).addLayer(L.geoJson(comShape, {
            onEachFeature: function (feature, layer) {
                layer.bindTooltip("Commune: " + String(feature.properties.nomcommune), {permanent: true, direction: "center", keepInView: true});  

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.