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

Pass all properties when creating midpoints and vertices, close #846 #847

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drewbo
Copy link
Contributor

@drewbo drewbo commented Dec 14, 2018

Updated the createMidpoint and createVertex to take a first parameter GeoJSON feature instead of an id. This allows passing properties down to the created points. This also updates all the calls to those functions (I think) and the necessary tests (plus two extra for adding userProperties)

@awulkan
Copy link
Contributor

awulkan commented Oct 31, 2019

I have also created an implementation for this, which works with the latest version of Mapbox Draw, and can be seen here:
https://github.com/awulkan/mapbox-gl-draw/tree/vertex-midpoint-properties

I will not submit a pull request though since it appears that @drewbo has already submitted one. I didn't know that this pull request existed until I was about to submit my own.

Please consider adding this functionality from either my or drewbo's code. It's a highly necessary feature for anyone that needs custom styling. In my situation I need to be able to hide vertices and midpoints so that our users don't think they can drag/reshape certain polygons.

@kkaefer kkaefer added api API & programatically working with library feature labels Jan 7, 2020
@karimnaaji karimnaaji closed this Jun 16, 2020
@karimnaaji karimnaaji reopened this Jun 17, 2020
@karimnaaji karimnaaji changed the base branch from master to main June 17, 2020 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API & programatically working with library feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants