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

Add marker title/icon? #16

Open
crystalenka opened this issue May 30, 2022 · 1 comment
Open

Add marker title/icon? #16

crystalenka opened this issue May 30, 2022 · 1 comment

Comments

@crystalenka
Copy link

Hi!

Thanks very much for this plugin, it's really helpful!

Is there any way to pull the marker title/alt/icon from the GeoJSON when it's creating the markers layer?

I've set some properties and options which is fine, but it doesn't appear to get used anywhere.

Here's an example point that I'm working with:

{
     "type":"Feature",
     "geometry": {
          "type":"Point",
          "coordinates": [-121.917961,37.879574]
     },
     "properties": {
          "id":56,
          "time":"Early Morning (12am-6am)",
          "type":"Live Sighting",
          "species":"Mountain Lion, Puma Concolor",
          "verification":"Confirmed"
     },
     "options": {
          "title":"Sighting: Confirmed, Mountain Lion, Puma Concolor, Live Sighting",
          "alt":"Sighting: Confirmed, Mountain Lion, Puma Concolor, Live Sighting"
     }
}

I'm in full control of the JSON that gets passed, but not sure how to get it to "talk" to Leaflet.

Thank you!

@BenjaminVadant
Copy link
Owner

BenjaminVadant commented Oct 11, 2022 via email

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

No branches or pull requests

2 participants