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

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