DavidJVitale / jekyll-leaflet

🗺️ Create leatlet.js maps in Jekyll
https://davidjvitale.com/tech/jekyll-leaflet/
MIT License
24 stars 16 forks source link

how to change the icons ? #8

Open jphconstantin opened 3 years ago

jphconstantin commented 3 years ago

Hello, Could you explain how to change the icon marker and, according to the issue #7, how to change the image size by using divId.

Thank you,

DavidJVitale commented 3 years ago

For your second question, I believe this is how you specify the divId:

{% leaflet_map { "zoom" : 9,
                 "divId" : "mydiv123" } %}

    {% leaflet_marker { "latitude" : 41.881832,
                        "longitude" : -87.623177,
                        "popupContent" : "Hello World from Chicago!" } %}

{% endleaflet_map %}

You would then specify the CSS for that particular id:

 #mydiv123 {
  height: 600px;
}

Let me know if that doesn't work. For your first question, I will have to look a bit deeper into specifying of customer marker images...

jphconstantin commented 3 years ago

Yesssss that works ! But it would be better to assign height in {% leaflet_map %} and other parameters ... ;-)

sgofferj commented 4 months ago

I came across this issue while trying to find out how to set custom marker icons. Is this available nowadays?