Add a scale.

This commit is contained in:
Oliver Jowett 2016-07-02 17:09:16 +01:00
parent 8639ab3837
commit 98564ab6d0

View file

@ -363,7 +363,11 @@ function initialize_map() {
view: new ol.View({ view: new ol.View({
center: ol.proj.fromLonLat([CenterLon, CenterLat]), center: ol.proj.fromLonLat([CenterLon, CenterLat]),
zoom: ZoomLvl zoom: ZoomLvl
}) }),
controls: [new ol.control.Zoom(),
new ol.control.Rotate(),
new ol.control.Attribution(),
new ol.control.ScaleLine({units: Metric ? "metric" : "nautical"})]
}); });
// Listeners for newly created Map // Listeners for newly created Map