mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 03:24:37 +01:00
Implement the extra markers icons.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -89,7 +89,14 @@ L.Contao = L.Class.extend({
|
||||
*/
|
||||
loadIcons: function (icons) {
|
||||
for (var i = 0; i < icons.length; i++) {
|
||||
var icon = L[icons[i].type](icons[i].options);
|
||||
var icon;
|
||||
|
||||
if (icons[i].type === 'extraMarkers.icon') {
|
||||
icon = L.ExtraMarkers.icon(icons[i].options);
|
||||
} else {
|
||||
icon = L[icons[i].type](icons[i].options);
|
||||
}
|
||||
|
||||
this.addIcon(icons[i].id, icon);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -103,7 +103,6 @@ L.OverPassLayer = L.FeatureGroup.extend({
|
||||
&& feature.properties.tags.amenity
|
||||
&& this.options.amenityIcons[feature.properties.tags.amenity]
|
||||
) {
|
||||
console.log(this.options.amenityIcons[feature.properties.tags.amenity]);
|
||||
icon = L.contao.getIcon(this.options.amenityIcons[feature.properties.tags.amenity]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user