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

Edit Layers makes browser stop working #729

Open
ghost opened this issue Dec 18, 2020 · 9 comments
Open

Edit Layers makes browser stop working #729

ghost opened this issue Dec 18, 2020 · 9 comments
Labels

Comments

@ghost
Copy link

ghost commented Dec 18, 2020

Hello!

I am trying to use this plugin with leaflet but when I am trying to click on the Edit Layers button my browser stop working. Includes Chrome, Opera, and Firefox.

Here is my code:

var m = L.map('map').locate({
        setView: true,       
    }), drawnItems = L.featureGroup().addTo(m);

 m.pm.addControls({
        position: 'topleft'
    });

m.on('pm:create', (e) => {
        var layer = e.layer;
        drawnItems.addLayer(layer);
    });

Any idea why would this happen? Or if some leaflet version is not supported?

Thank you in advance.

@Falke-Design
Copy link
Collaborator

I was not able to reproduce this. Can you please create a demo https://jsfiddle.net/o1dwu2vg/

What leaflet Version are you using? Do you use the latest version of geoman 2.8.0?

@gavinduffy2
Copy link

just an FYI, i have the same issue. i simply removed this tool from the toolbar. everything else works fantastic.
great plugin.

@Falke-Design
Copy link
Collaborator

@gavinduffy2 can you please give me more informations? How many layers are on the map? Only a certain Shape (Marker, Line, Polygon,...)? Are you using some other plugins?

The best would be to have a demo

@gavinduffy2
Copy link

gavinduffy2 commented Mar 1, 2021 via email

@Falke-Design
Copy link
Collaborator

@gavinduffy2 can you share the geojson layers? Can you reproduce the error, when you adding the geojson to this demo? https://jsfiddle.net/o1dwu2vg/

@gavinduffy2
Copy link

gavinduffy2 commented Mar 1, 2021 via email

@Falke-Design
Copy link
Collaborator

@gavinduffy2 thx!!! It was possible to reproduce, I will take a look into it, in the next days.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

// load GeoJSON parcel polys
var geojsonPolys;
$.getJSON("https://raw.githubusercontent.com/scdoshi/us-geojson/master/geojson/state/AK.geojson", function (data) {
	console.log(data);
  //geojsonPolys = L.geoJson(data).addTo(map);
});

@gavinduffy2
Copy link

gavinduffy2 commented Mar 2, 2021 via email

@Falke-Design
Copy link
Collaborator

There is a open Feature Request #332 you can upvote it.

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

No branches or pull requests

2 participants