fix popups (all popups were the same)
This commit is contained in:
@@ -254,10 +254,6 @@ my.Map = Backbone.View.extend({
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
self.features.addData(feature);
|
self.features.addData(feature);
|
||||||
|
|
||||||
if (feature.properties && feature.properties.popupContent) {
|
|
||||||
self.features.bindPopup(feature.properties.popupContent);
|
|
||||||
}
|
|
||||||
} catch (except) {
|
} catch (except) {
|
||||||
wrongSoFar += 1;
|
wrongSoFar += 1;
|
||||||
var msg = 'Wrong geometry value';
|
var msg = 'Wrong geometry value';
|
||||||
@@ -411,6 +407,7 @@ my.Map = Backbone.View.extend({
|
|||||||
this.features = new L.GeoJSON(null,{
|
this.features = new L.GeoJSON(null,{
|
||||||
pointToLayer: function (feature, latlng) {
|
pointToLayer: function (feature, latlng) {
|
||||||
var marker = new L.marker(latlng);
|
var marker = new L.marker(latlng);
|
||||||
|
marker.bindPopup(feature.properties.popupContent);
|
||||||
self.markers.addLayer(marker);
|
self.markers.addLayer(marker);
|
||||||
return marker;
|
return marker;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user