beyonk-group / svelte-mapbox

MapBox Map and Autocomplete components for Svelte (or Vanilla JS)
MIT License
343 stars 61 forks source link

Custom Markers as slot #34

Closed Amerlander closed 3 years ago

Amerlander commented 3 years ago

This adds the ability to user HTML inside the Marker which gets used as marker:

<Marker
    popup={false}
    lat={geo.lat}
    lng={geo.lng}
    >
    <a href={target.link}>
        <p>{target.title}</p>
    </a>
</Marker>

Default behavior is still preserved.

Will fix https://github.com/beyonk-adventures/svelte-mapbox/issues/33

CraigChamberlain commented 3 years ago

I'd like this feature

evdama commented 3 years ago

@antony what do you think merging this? 😊

antony commented 3 years ago

Great stuff! I'll release shortly.