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

Show an example of draggin a marker/label #31

Open
JamesLMilner opened this issue Oct 1, 2017 · 0 comments
Open

Show an example of draggin a marker/label #31

JamesLMilner opened this issue Oct 1, 2017 · 0 comments

Comments

@JamesLMilner
Copy link
Contributor

JamesLMilner commented Oct 1, 2017

Labelgun has the ability to set a label to be 'dragged' which in turn makes it's weight infinite and always shown in the collision calculations. An example in Leaflet or OpenLayers would be super!

Here's an example of how you might do it:

   // The last argument is dragged which we set to true
    labelEngine.ingestLabel(
      boundingBox,
      id,
      parseInt(Math.random() * (5 - 1) + 1), // Weight
      label,
      "Test " + id,
      true 
    ); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant