Plugin Contributor
hupe13
(@hupe13)
The blue icon is the default of Leaflet. You can find markers in other colors e.g. at https://github.com/pointhi/leaflet-color-markers. Download these markers and use it like:
[leaflet-marker lat=... lng=... iconUrl="/wp-content/uploads/icons/marker-icon-red.png" shadowUrl='/wp-content/uploads/icons/marker-shadow.png' iconAnchor='12,41' popupAnchor='1,-34']some text[/leaflet-marker].
If you want more markers take a look: https://leafext.de/en/marker/extramarker/.
Thread Starter
dwaber
(@dwaber)
Thanks for your fast reply.
Is there a way to set this as default marker. Or in other words: Can I overwrite the default shortcode with this options, that I can have always this new marker as default (apply a filter).
Something like this:
function my_default_marker( $marker ) {
$marker = array(
'shape' => 'square',
'color' => 'green-light',
'icon' => 'fa-walking',
'iconColor' => 'white',
);
return $marker;
}
add_filter('leaflet_default_marker', 'my_default_marker', 10, 1);
-
This reply was modified 3 years, 6 months ago by
dwaber.
-
This reply was modified 3 years, 6 months ago by
dwaber.
Plugin Contributor
hupe13
(@hupe13)
Bozdoz has a FAQ: How Can I Add another Leaflet Plugin?. Look at the js part. I would start there.
Or see how quick and dirty I did it with extramarker.