Skip to content

Commit 6939c2d

Browse files
committed
Minor updates
- Update legend/layer control to latest version that has bug fixes. - Minor typo fixes.
1 parent 7261d18 commit 6939c2d

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

Samples/Map/Swipe between two maps/Swipe between two maps.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
secondaryDataSource.importDataFromUrl('/data/geojson/US_County_Unemployment_2017.geojson');
9292

93-
//Choropleth based on suze of labor force in the US counties.
93+
//Choropleth based on size of the labor force in the US counties.
9494
secondaryMap.layers.add(new atlas.layer.PolygonLayer(secondaryDataSource, null, {
9595
fillColor: [
9696
'step',

Samples/Map/Swipe map with fullscreen support/Swipe map with fullscreen support.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
secondaryDataSource.importDataFromUrl('/data/geojson/US_County_Unemployment_2017.geojson');
103103

104-
//Choropleth based on suze of labor force in the US counties.
104+
//Choropleth based on size of the labor force in the US counties.
105105
secondaryMap.layers.add(new atlas.layer.PolygonLayer(secondaryDataSource, null, {
106106
fillColor: [
107107
'step',

Static/lib/azure-maps/azure-maps-layer-legend.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ MIT License
376376
Utils.getMapLayers = function (map, layerFilter) {
377377
var userLayers = [];
378378
if (map) {
379-
var mapLayers = map.layers.getLayers();
379+
//Workaround: get user defined layers, not all layers (including basemap layers).
380+
var mapLayers = map.layers['_getUserLayers']().map(function (l) { return l.layer; });
380381
var layers_1 = [];
381382
var filter_1 = [];
382383
if (layerFilter && layerFilter.length > 0) {
@@ -1843,14 +1844,14 @@ MIT License
18431844
container.setAttribute('aria-expanded', !minimized + '');
18441845
var classList = container.classList;
18451846
if (showBtnBg) {
1846-
if (!classList.contains(btnCss)) {
1847-
classList.add(btnCss);
1848-
}
1847+
classList.remove(btnCss);
18491848
btn.style.display = '';
18501849
container.style.cursor = '';
18511850
}
18521851
else {
1853-
classList.remove(btnCss);
1852+
if (!classList.contains(btnCss)) {
1853+
classList.add(btnCss);
1854+
}
18541855
btn.style.display = 'none';
18551856
if (minimized) {
18561857
container.style.cursor = 'pointer';

Static/lib/azure-maps/azure-maps-layer-legend.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)