Support popups.

This commit is contained in:
David Molineus committed 2016-11-14 11:50:20 +01:00
1 parent f462a11c1d
commit cb370f6723
4 files changed
+26 -3

No files matched your search

+6 -2
View File
@@ -110,8 +110,10 @@ L.OverPassLayer = L.FeatureGroup.extend({
if (icon) {
marker.setIcon(icon);
}
}
L.contao.bindPopupFromFeature(marker, feature);
if (this.options.overpassPopup) {
marker.bindPopup(this.options.overpassPopup(feature, marker));
}
this._map.fire('point:added', {marker: marker, feature: feature, latlng: latlng, type: type});
@@ -122,7 +124,9 @@ L.OverPassLayer = L.FeatureGroup.extend({
if (feature.properties) {
L.Util.setOptions(layer, feature.properties.options);
L.contao.bindPopupFromFeature(layer, feature);
if (this.options.overpassPopup) {
layer.bindPopup(this.options.overpassPopup(feature, layer));
}
this._map.fire('feature:added', {feature: feature, layer: layer});
}