We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 a section on the documentation on "how to load a custom marker image for the StoreLocator component"
Add the important details:
icon-size
icon-image
addImage
Code:
<template> <store-locator :items="items" :mapbox-cluster="{ 'unclustered-point-layer-type': 'circle', 'unclustered-point-layer-type': 'symbol', 'unclustered-point-layout': { 'icon-image': 'pin', 'icon-size': 1 }, 'unclustered-point-paint': {}, }" access-token="..." :mapbox-map="{ mapStyle: '...', center: [ 2.0, 48.0 ], zoom: 1, }" @map-created="onMapCreated"> <!-- template --> </store-locator> </template> <script> export default { props: { items: { type: Array, required: true, }, }, methods: { onMapCreated(map) { const imgPath = 'imag.png'; map.loadImage(imagePath, (error, image) => { if (error) { throw error; } map.addImage('pin', image); }); }, }, }; </script>
The text was updated successfully, but these errors were encountered:
Please add this to the docs! We thought it wasn't supported until we saw this issue!
Sorry, something went wrong.
perruche
No branches or pull requests
Add a section on the documentation on "how to load a custom marker image for the StoreLocator component"
Add the important details:
icon-size
param if you load a png in size 2x or 3xicon-image
param must use the same name as inaddImage
fnCode:
The text was updated successfully, but these errors were encountered: