Keep measurement info windows open
This commit is contained in:
parent
ab8fc7dd3b
commit
f641867551
@ -148,7 +148,7 @@ export class MapService {
|
|||||||
]}).addTo(this.map);
|
]}).addTo(this.map);
|
||||||
this.measurements.push({line: line, decoration: decoration});
|
this.measurements.push({line: line, decoration: decoration});
|
||||||
let distance = distanceInM(latlng1.lat, latlng1.lng, latlng2.lat, latlng2.lng);
|
let distance = distanceInM(latlng1.lat, latlng1.lng, latlng2.lat, latlng2.lng);
|
||||||
line.bindPopup(`${distance > 1000 ? Math.round(distance / 100) / 10 : Math.round(distance)} ${distance > 1000 ? 'k' : ''}m`).openPopup();
|
line.bindPopup(`${distance > 1000 ? Math.round(distance / 100) / 10 : Math.round(distance)} ${distance > 1000 ? 'k' : ''}m`, {autoClose: false, closeOnClick: false}).openPopup();
|
||||||
line.on('click', () => { if(this.deleteMode) this.delete(line, decoration);});
|
line.on('click', () => { if(this.deleteMode) this.delete(line, decoration);});
|
||||||
return {line: line, decoration: decoration};
|
return {line: line, decoration: decoration};
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,11 @@ if (environment.production) {
|
|||||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
|
|
||||||
// Add touch events to leaflet
|
// leaflet ===========================================
|
||||||
declare const L;
|
declare const L;
|
||||||
|
|
||||||
|
// Touch support
|
||||||
L.Map.mergeOptions({touchExtend: true});
|
L.Map.mergeOptions({touchExtend: true});
|
||||||
|
|
||||||
L.Map.TouchExtend = L.Handler.extend({
|
L.Map.TouchExtend = L.Handler.extend({
|
||||||
initialize: function (map) {
|
initialize: function (map) {
|
||||||
this._map = map;
|
this._map = map;
|
||||||
|
Loading…
Reference in New Issue
Block a user