Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can't I write like this? How should I revise it? #80

Open
2qq2qq opened this issue Apr 17, 2021 · 0 comments
Open

Why can't I write like this? How should I revise it? #80

2qq2qq opened this issue Apr 17, 2021 · 0 comments

Comments

@2qq2qq
Copy link

2qq2qq commented Apr 17, 2021

Why can't I write like this? How should I revise it?

var control = L.Control.fileLayerLoad({
fitBounds: true,
layerOptions: {
onEachFeature: function (feature, layer) {
if (feature.properties.name) { layer.bindTooltip(feature.properties.name, { permanent: true }) };

//if (feature.properties.name) { layer.bindTooltip([latlng], { permanent: true }) };
},

pointToLayer: function (data, latlng) {
return L.circleMarker(latlng, {style: style});

control.loader.on('data:loaded', function (event) {
// event.layer gives you access to the layers you just uploaded!

    // Add to map layer switcher
    layerswitcher.addOverlay(event.layer, event.filename);
});

}}
});

control.addTo(map);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant