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

Adds Leaflet.Editable to Map component #85

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Conversation

parksjr
Copy link
Collaborator

@parksjr parksjr commented Feb 5, 2024

Allows for programmatic enabling of layer editing.

Example

const layers = featureGroup.getLayers();
layers.forEach((layer) => {
  layer.enableEdit();
  layer.on('editable:editing', (layer, leafletElement) => console.log('edit event'));
});

See also

Leaflet.Editable for more documentation on usage.

Some background

We initially were going about the edit route via Leaflet.draw, until we ran into an issue similar to the one described here. Those comments led us to Leaflet.Editable, which was the easiest and cleanest solution for Sir FOGG.

@parksjr parksjr changed the base branch from master to main March 1, 2024 18:36
@parksjr parksjr changed the base branch from main to master March 1, 2024 18:39
@parksjr parksjr merged commit 21584bc into master Mar 1, 2024
1 check passed
@parksjr parksjr deleted the mparks/leaflet-editable branch March 1, 2024 18:43
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

Successfully merging this pull request may close these issues.

1 participant