Skip to content

Commit

Permalink
Map / Add scale. (#7967)
Browse files Browse the repository at this point in the history
* Map / Add scale.

* Update gn_map_default.less
  • Loading branch information
fxprunayre authored May 6, 2024
1 parent 4ff5da2 commit f20b83a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@
setTimeout(function () {
scope.map.updateSize();
}, 300);

if (gnViewerSettings.mapConfig.disabledTools.scaleLine === false) {
scope.map.addControl(new ol.control.ScaleLine());
}
}
};
}
Expand Down
3 changes: 2 additions & 1 deletion web-ui/src/main/resources/catalog/js/CatController.js
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,8 @@
graticule: false,
mousePosition: true,
syncAllLayers: false,
drawVector: false
drawVector: false,
scaleLine: false
},
defaultTool: "layers",
defaultToolAfterMapLoad: "layers",
Expand Down
1 change: 1 addition & 0 deletions web-ui/src/main/resources/catalog/locales/en-v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
"application/vnd.geo+json": "GeoJSON",
"application/json": "JSON",
"shape-zip": "ESRI Shapefile",
"scaleLineTool": "Map scale",
"text/xml; subtype=gml/2.1.2": "GML 2.1.2",
"text/xml; subtype=gml/3.1.1": "GML 3.1.1",
"text/xml; subtype=gml/3.2": "GML 3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
}
.ol-attribution {
.gn-attribution();
bottom: 1em;
left: 1em;
bottom: 1em;
button {
background-color: @brand-primary;
}
Expand All @@ -48,6 +48,15 @@
}
}

.ol-scale-line {
bottom: 1em;
left: 180px;
@media screen and (max-height: 768px) {
left: auto;
right: 180px;
}
}

.panel-tools {
.panel-heading {
background-color: transparent;
Expand Down

0 comments on commit f20b83a

Please sign in to comment.