-
Notifications
You must be signed in to change notification settings - Fork 56
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 box #265
Edit box #265
Conversation
This is a great addition to the editor. However I cant get it to work as expected. All editableLayers gets the same drawTools as the first layer in the array. |
@jokd how is your editor control defined? |
@afogelberg Just like in the example but with a capital P for the geometryType |
Is the layer not visible or empty? If a layer is not visible then a geometryType is not read yet since the geometryType is read from the first feature loaded to the map. Set the geometry type for the layer to solve it, for example "geometryType": "Polygon". |
I have set the geometryType for each editable layer in the editor.json so that's not the solution. |
@jokd the geometryType check has been broken which is apparent when the layer is not visible from the beginning. But with the offline control that is now merged with master the geometryType is verified in a better way. It should work now with the latest updates in this branch. |
I stumbled upon a problem when using editor and offline together, due to source change in offline. This is fixed with the latest commit in this branch. |
I got ok from @jokd and will go ahead and merge |
This PR enhances the draw tool for ther editor control with a draw tool menu. It's now possible to add a tool for drawing a box. If the box tool is added to the editor then a menu with drawing tools will be shown when the draw tool is clicked. The draw tools can be added in two ways:
This PR depends on #263