-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix issue snapping to mvt #1171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbauszus-glx
✅ This has resolved the issue when creating a new geometry and trying to snap to a layer.
❌ Editing an existing geometry throws a warning in the console.
❓ In looking through old configuration - I see a lot of
layer.snap:true
- please can we add a warning to remove this as it doesn't do anything?
layer.snap.layer_key
- please can we add a warning to update this to layer.snap.layer.layer_key
?
snap.true should work. this should snap to the layer itself. might be a bug. i haven't tested editing but only drawing, will need to look into this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @dbauszus-glx
All worked for me!
I have added in additional documentation for the mapview snap interaction and the layer mvt format modules.
I added in the params/properties at the top of the each function and nested them.
eg.
/**
@param layer
@param [layer.srid] - description
@param [layer.tables] - description
*/
Please have a look and let me know what you think.
@RobAndrewHurst Looking good. I think just a reference for mapview, style, etc object is enough once these these objects are sufficiently described in place. |
Pushed a commit to 'allow' string assignment of snap: layer_key but warn about incorrect configuration. As this configuration is used currently in multiple places, and we don't want any breaking changes. This is still not working on editing a geometry - should this be a separate PR @dbauszus-glx ? |
Quality Gate passedIssues Measures |
This PR fixes an issue attempting to snap to an MVT layer with zoom level restrictions.
The snap interaction should attempt to display the layer. Snapping is only possible to loaded features. Adding features to the snap source must be tried. MVT layer have duplicate features add duplicate features would crash this process.