Commit bfbe9fef authored by Thomas Frion's avatar Thomas Frion

[FEAT] Leaflet fix the problem with the multiple copies of worp map

parent fb2d2ca1
......@@ -27,7 +27,8 @@ export class MapComponent implements OnInit {
// https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
this.tiles = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, &copy; <a href="http://garmin.opentopomap.org/#right">OpentTopoMap</a>'
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, &copy; <a href="http://garmin.opentopomap.org/#right">OpentTopoMap</a>',
});
}
......@@ -35,7 +36,8 @@ export class MapComponent implements OnInit {
let marker = L.marker(this.getCoor(this.unit.geom));
this.map = L.map('map', {
center: this.getCoor(this.unit.geom),
zoom: this.unit.getSetting(UnitSetting.SettingName.Zoom).value //unit.settings[0].value
zoom: this.unit.getSetting(UnitSetting.SettingName.Zoom).value, //unit.settings[0].value,
worldCopyJump: true
});
marker.bindPopup("<b>" + this.unit.code + "</b> <br>" + this.unit.name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment