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
Is it possible to set a custom marker instead of the stadard blue dot?
The text was updated successfully, but these errors were encountered:
Have a look at the options in https://github.com/domoritz/leaflet-locatecontrol#possible-options. You can change the style but it is actually not an icon but a circle drawn directly.
I think it would be nice to be able to use a real custom icon. If you want, send me a pull request.
Sorry, something went wrong.
Just FYI and anyone searching, here's how I did it:
var iconGreen = { iconUrl: 'leaf-green.png', shadowUrl: 'leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62], popupAnchor: [-3, -76] }; L.control.locate({ markerClass: L.marker, markerStyle: { icon: L.icon( iconGreen ) } }).addTo(map);
JSFiddle Demo
@chk1 Awesome. I just created a label for issues with solutions like yours!
No branches or pull requests
Is it possible to set a custom marker instead of the stadard blue dot?
The text was updated successfully, but these errors were encountered: