-
Notifications
You must be signed in to change notification settings - Fork 998
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
snapping for polygon when editing #659
Comments
I sent a PR to Leaflet Snap to snap that fixes these issues for the version
of Leaflet Draw for Leaflet 1.0. Once that author merges that, snap will
work again.
…On Fri, Dec 16, 2016 at 7:29 AM, nyrull ***@***.***> wrote:
- Leaflet version I'm using: 0.7.5
- Leaflet Draw version I'm using: 3.0
- Browser (with version) I'm using: chrome Version 54.0.2840.99 m
- OS/Platform (with version) I'm using: win 10 64bit pro version 1511
Hi,im posting here because Leaflet.snap github look dead,as you can see i
have already posted there :
makinacorpus/Leaflet.Snap#41
<makinacorpus/Leaflet.Snap#41>
I can create polygon and when creating it will snap to existing one no
problem,but when editing there is no snapping at all, if someone can tell
me whats wrong !
some code,very basic :
$(document).ready(function () {
var guideLayers = [];
var map = L.map('mapContainer', {
layers: MQ.mapLayer(),
center: [46.814184, -71.207425],
zoomControl: true,
zoom: 8
});
var drawnItems = new L.FeatureGroup();
map.addLayer(drawnItems);
var drawControl = new L.Control.Draw({
draw: {
circle: false,
marker: false,
polyline: false,
rectangle:false,
polygon: {
guideLayers: guideLayers,
snapDistance: 5,
allowIntersection: false,
showArea: true,
drawError: {
color: '#b00b00',
timeout: 1000
},
}
},
edit: {
featureGroup: drawnItems,
edit: true,
remove:false
}
});
map.addControl(drawControl);
map.on('draw:created', function (e) {
var type = e.layerType,
layer = e.layer;
drawnItems.addLayer(layer);
guideLayers.push(layer);
});
});
```javascript
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#659>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzNEkeYw7yjobX4xA3SBW3Nauy1QA_Tks5rIq5EgaJpZM4LPS1f>
.
|
HI ! Haven't heard of L.Snap since then ? Is it dead ? |
Apparently... they haven't responded to my messages or PR for 2 months now.
=/
…On Thu, Feb 9, 2017 at 7:44 AM, nyrull ***@***.***> wrote:
HI ! Havent heard of L.Snap since then ?
I have look at it and dont see any change.
Is it dead ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#659 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzNEoJiZbhZLeIM3LCAlnCJP3GsmgwGks5razRtgaJpZM4LPS1f>
.
|
Leaflet.PM just implemented snapping. Maybe worth checking.
9. feb. 2017 6:13 pop. je oseba "Joseph Ryan" <[email protected]>
napisala:
… Apparently... they haven't responded to my messages or PR for 2 months now.
=/
On Thu, Feb 9, 2017 at 7:44 AM, nyrull ***@***.***> wrote:
> HI ! Havent heard of L.Snap since then ?
> I have look at it and dont see any change.
>
> Is it dead ?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#659#
issuecomment-278680330>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAzNEoJiZbhZLeIM3LCAlnCJP3GsmgwGks5razRtgaJpZM4LPS1f>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#659 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKV7eifD3E2XSfo_btseeajfla4UdnYSks5ra0kqgaJpZM4LPS1f>
.
|
Looks nice, but no Square or Circle tools, unfortunately, and the demo
doesn't snap like the preview-image shows. =/
Maybe I should just fork Leaflet.Draw and Leaflet.Snap into a new project
or something? Leaflet.SnapDraw? But I really have time to maintain it
myself, the project I had been working on was just for a hobby. =/
Joe
…On Thu, Feb 9, 2017 at 10:09 AM, themre ***@***.***> wrote:
Leaflet.PM just implemented snapping. Maybe worth checking.
9. feb. 2017 6:13 pop. je oseba "Joseph Ryan" ***@***.***>
napisala:
> Apparently... they haven't responded to my messages or PR for 2 months
now.
> =/
>
> On Thu, Feb 9, 2017 at 7:44 AM, nyrull ***@***.***> wrote:
>
> > HI ! Havent heard of L.Snap since then ?
> > I have look at it and dont see any change.
> >
> > Is it dead ?
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <#659#
> issuecomment-278680330>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AAzNEoJiZbhZLeIM3LCAlnCJP3GsmgwGks5razRtgaJpZM4LPS1f>
> > .
> >
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#659#
issuecomment-278707932>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AKV7eifD3E2XSfo_
btseeajfla4UdnYSks5ra0kqgaJpZM4LPS1f>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#659 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzNErbkVZE_oFvLoG6MJYrMAANiPN76ks5ra1ZvgaJpZM4LPS1f>
.
|
Leaflet.PM look nice but i have too much stuff going on with Leaflet.Draw right now in my app. It would be too much work to change all the api. Leaflet.SnapDraw sound good :) It is sad to not have any news from L.Snap... If you decide to fork Leaflet.Draw and Leaflet.Snap into a new project let me know ! Anyway, thx for your time , i really appreciate it :) |
Hi,im posting here because Leaflet.snap github look dead,as you can see i have already posted there :
makinacorpus/Leaflet.Snap#41
I can create polygon and when creating it will snap to existing one no problem,but when editing there is no snapping at all, if someone can tell me whats wrong !
some code,very basic :
The text was updated successfully, but these errors were encountered: