Skip to content

Commit

Permalink
fix(markers): Bug solved which prevents to create a markers group wit…
Browse files Browse the repository at this point in the history
…hout overlay
  • Loading branch information
tombatossals committed Feb 9, 2014
1 parent 4dacd3d commit 2017f1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/directives/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ angular.module("leaflet-directive").directive('layers', function ($log, $q, leaf
leafletLayers.baselayers = {};
leafletLayers.controls = {};
leafletLayers.controls.layers = new L.control.layers();
if (layers.options != null) {
leafletLayers.controls.layers.options = layers.options;
};
if (isDefined(layers.options)) {
leafletLayers.controls.layers.options = layers.options;
}
leafletLayers.controls.layers.setPosition(defaults.controlLayersPosition);


Expand Down
3 changes: 2 additions & 1 deletion src/directives/markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ angular.module("leaflet-directive").directive('markers', function ($log, $rootSc
marker.openPopup();
}

} else {
// Add the marker to the map if it hasn't been added to a layer or to a group
} else if (!isDefined(markerData.group)) {
// We do not have a layer attr, so the marker goes to the map layer
map.addLayer(marker);
if (markerData.focus === true) {
Expand Down

0 comments on commit 2017f1a

Please sign in to comment.