diff --git a/src/labeler.html b/src/labeler.html index a0001fa..4893109 100644 --- a/src/labeler.html +++ b/src/labeler.html @@ -8,7 +8,7 @@ Spatial imagery labeler tool - + @@ -244,7 +244,7 @@

- + diff --git a/src/modules/projectBuilder.js b/src/modules/projectBuilder.js index 8d9de75..0b2b973 100644 --- a/src/modules/projectBuilder.js +++ b/src/modules/projectBuilder.js @@ -170,12 +170,7 @@ export class ProjectBuilderApp { map.map.getSource(gridSource.getId()).promoteId = '_azureMapsShapeId'; //Create a layer to display the area of a grid cell. - const gridLayer = new atlas.layer.PolygonLayer(gridSource, null, { - //Color based on the availability of layers in each cell. - fill: [ - - ] - }); + const gridLayer = new atlas.layer.PolygonLayer(gridSource); //Create a layer to display the outline of a grid cell. const gridOutlineLayer = new atlas.layer.LineLayer(gridSource, null, { diff --git a/src/modules/utils.js b/src/modules/utils.js index db44a55..65392eb 100644 --- a/src/modules/utils.js +++ b/src/modules/utils.js @@ -402,6 +402,15 @@ export class Utils { }) }); } + static setBaseTransitLayer(map) { + if(map && Utils.#BaseTranistLayer === null) { + app.map.layers.layerIndex.forEach((l) => { + if(Utils.#BaseTranistLayer === null && ((l.options && l.options.lineCap) || l.id === 'transit' || l.id === 'roads' || l.id.startsWith('microsoft.bing.maps.roadDetails.road'))) { + Utils.#BaseTranistLayer = l.id ; + } + }); + } + } /** * Inflates a layer from a config file and adds it to the map. @@ -417,13 +426,7 @@ export class Utils { //Ensure layer doesn't already exist in the map. layer = map.layers.getLayerById(name); - if(Utils.#BaseTranistLayer === null) { - app.map.layers.layerIndex.forEach((l) => { - if(Utils.#BaseTranistLayer === null && (l.id === 'transit' || l.id === 'roads' || l.id.startsWith('microsoft.bing.maps.roadDetails.road'))) { - Utils.#BaseTranistLayer = l.id ; - } - }); - } + Utils.setBaseTransitLayer(map); if (!layer) { switch (options.type) { diff --git a/src/projectBuilder.html b/src/projectBuilder.html index 070996a..70acc4f 100644 --- a/src/projectBuilder.html +++ b/src/projectBuilder.html @@ -8,7 +8,7 @@ Spatial imagery labeling project builder - + @@ -179,7 +179,7 @@

Step 5: Complete

- + diff --git a/src/projectViewer.html b/src/projectViewer.html index 115324d..261a636 100644 --- a/src/projectViewer.html +++ b/src/projectViewer.html @@ -8,7 +8,7 @@ Spatial imagery labeling project viewer - + @@ -55,7 +55,7 @@

Spatial imagery labeling project viewer

- +