Skip to content

Commit

Permalink
fix(tiles): Fixed a bug related with multiple maps on screen and tile…
Browse files Browse the repository at this point in the history
…s. Thanks to @gabrielhase.

#279
  • Loading branch information
tombatossals committed Feb 9, 2014
1 parent 375da75 commit 3a77452
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/angular-leaflet-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ angular.module("leaflet-directive", []).directive('leaflet', function ($q, leafl
if (!isDefined(attrs.tiles) && (!isDefined(attrs.layers))) {
var tileLayerObj = L.tileLayer(defaults.tileLayer, defaults.tileLayerOptions);
tileLayerObj.addTo(map);
leafletData.setTiles(tileLayerObj);
leafletData.setTiles(tileLayerObj, attrs.id);
}

// Set zoom control configuration
Expand Down Expand Up @@ -342,6 +342,7 @@ angular.module("leaflet-directive").directive('geojson', function ($log, $rootSc
},
click: function(e) {
safeApply(leafletScope, function() {
geojson.selected = feature;
$rootScope.$broadcast('leafletDirectiveMap.geojsonClick', geojson.selected, e);
});
}
Expand Down
Loading

0 comments on commit 3a77452

Please sign in to comment.