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

Adding names to the markers. #47

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

readingdancer
Copy link
Contributor

This PR adds two new properties to the options " name " and " nameClasses " the first is the text used for the marker name and the second is a list of one or more classes that can be added to the DIV.

This allows you to easily add names next to your markers ( you can use your own CSS to position it where ever you want it to go, i.e. above / below / at the side etc. )

I have also updated some of the dependencies as they had security warnings.

Feel free to take it or reject it :)

FYI we are using your plugin on https://nccovidsupport.org thank you for writing it in the first place, it saved us a bit of time 👍

This added two new properties to the options " name " and " nameClasses " the first is the text used for the marker name and the second is a list of one or more classes that can be added to the DIV.

This allows you to easily add names next to your markers ( you can use your own CSS to position it whereever you want it to go )

I have also updated some of the dependencies as they had security warnings.
@coryasilva
Copy link
Owner

coryasilva commented Apr 29, 2020 via email

@coryasilva
Copy link
Owner

@readingdancer BTW the your covid mapping application looks great and seems very helpful. I especially like the filters and the svg markers -- of course ;)

@coryasilva coryasilva merged commit 5722ba9 into coryasilva:master Apr 29, 2020
@readingdancer
Copy link
Contributor Author

Thanks @coryasilva I am glad you like the site, it's a labor of love as it's a voluntary open source project: NC COVID Support on GitHub

Although I am sure this PR might be useful for some people, I am now struggling to figure out how to position the labels so that when you have markers close together, the labels don't overlap ( or appear at all, probably based on an importance weighting )

We have an issue for it on GitHub which probably explains this a little better with a couple of images.

If you have any ideas, we'd welcome some help :)

@coryasilva
Copy link
Owner

@readingdancer Will it mess you up if I rename the name and nameClasses options to label and labelClasses?

@readingdancer
Copy link
Contributor Author

Hi @coryasilva no not at all, I'm currently using the code from my fork, but once you've made your change I will probably change it to use npm so we can keep up to date more easily if you update it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants