fix popups (all popups were the same)

This commit is contained in:
Dominik Moritz 2012-09-25 11:49:43 +01:00
parent 2d26afb435
commit 16fc21ac03

View File

@ -254,10 +254,6 @@ my.Map = Backbone.View.extend({
try {
self.features.addData(feature);
if (feature.properties && feature.properties.popupContent) {
self.features.bindPopup(feature.properties.popupContent);
}
} catch (except) {
wrongSoFar += 1;
var msg = 'Wrong geometry value';
@ -411,6 +407,7 @@ my.Map = Backbone.View.extend({
this.features = new L.GeoJSON(null,{
pointToLayer: function (feature, latlng) {
var marker = new L.marker(latlng);
marker.bindPopup(feature.properties.popupContent);
self.markers.addLayer(marker);
return marker;
}