Skip to content

Commit

Permalink
Update utils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrundritt committed Sep 12, 2023
1 parent cb54fb7 commit 271d31b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,10 @@ export class Utils {
* @param {*} map An Azure Maps control instance.
*/
static hideNonEssentialLayers(map) {
Utils.#setBaseLayerVisibility(map, false, (l) => {
Utils.#setBaseLayerVisibility(map, false, (l) => {
var smallId = l.id.toLowerCase();
//If the layer ID starts with 'microsft.maps', and is a fill (polygon), a line layer other than a boarder layer, or a symbol layer containing POI content, hide the layer.
return (l.id && l.id.toLowerCase().indexOf('microsoft.maps.') === 0 && (
return (l.id && (smallId.indexOf('microsoft.maps.') === 0 || smallId.indexOf('microsoft.bing.maps.') === 0) && (
l.type === 'fill' ||
(l.type === 'line' && Utils.#BorderLayers.indexOf(l.id) === -1) ||
(l.type === 'symbol' && Utils.#POILayers.indexOf(l.id) > -1)));
Expand Down

0 comments on commit 271d31b

Please sign in to comment.