Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map / Add scale. #7967

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,23 @@
return "time";
} else if (scope.isDate(input)) {
return "date";
} if (scope.isDateTime(input)) {
}
if (scope.isDateTime(input)) {
return "datetime-local";
} else
return "";
} else return "";
};
scope.getDateBounds = function (input, isMin) {
if (!input) {
return;
} else if (isMin) {
return input.literalData.allowedValues.valueOrRange[0].minimumValue
.value || "";
return (
input.literalData.allowedValues.valueOrRange[0].minimumValue.value ||
""
);
}
return input.literalData.allowedValues.valueOrRange[0].maximumValue.value || "";
return (
input.literalData.allowedValues.valueOrRange[0].maximumValue.value || ""
);
};

// get values from wfs filters
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
Loading