Implement the extra markers icons.

This commit is contained in:
David Molineus
2016-11-14 13:31:19 +01:00
parent 3f05bd8783
commit d95f45d35a
6 changed files with 169 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -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);
}
},

View File

@@ -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]);
}