Leaflet: Show Marker on Static Location

I have a very simple Leaflet map. Displays location (based on coordinates of a specific street address) correctly but doesn't show a marker? Is there a way to show the marker of the address?

https://sandbox.lawryk.ca/leaflet

It's kind f useless without a marker. Am I missing something very simple?

Here is my code:

<div is="dmx-leaflet-map" id="leafletmap1" latitude="52.151360" longitude="-122.173470" address="Williams Lake" zoom="15" style="width: 100%; height: 600px;" marker-color="'Green'" marker-latitude="52.15136" marker-longitude="-122.17347">
    <dmx-leaflet-search id="leafletsearch1" dmx-bind:params="{countrycodes:['CA'],'accept-language':'en',addressdetails:true}" position="bottomleft" show-popup="true" auto-close="true" keep-result="true" max-suggestions="10" max-markers="2" retain-zoom-level="true" control-style="button"></dmx-leaflet-search>
</div>

Hey Brad,

Have you added a Marker?

1 Like

Argh! That’s the one place I didn’t look. Now I feel stupid. Not at my computer at the moment but that will probably solve it. Thanks once again.

1 Like

I wouldn't really ask but I saw that the leaflet-pane leaflet-marker-pane was empty (no img child with the marker), so I said... "Or no marker or it's a bug.. Let's ask first"

Some empty settings may be from me experimenting. Not sure. But adding a marker as you suggested worked.

Now that I actually have a clue it's time to try it on the actual site that it is suppose to go on and compare code.

1 Like