💄 Use fixed pixel for mobile marker offset view
This commit is contained in:
parent
69cde40fc1
commit
14ad34ca9a
@ -259,7 +259,11 @@ export class DashboardComponent implements OnInit, AfterViewInit {
|
|||||||
this.selectedPlace = { ...place };
|
this.selectedPlace = { ...place };
|
||||||
|
|
||||||
let toView = { ...e.latlng };
|
let toView = { ...e.latlng };
|
||||||
if ('ontouchstart' in window) toView.lat = toView.lat - 0.0175;
|
if ('ontouchstart' in window) {
|
||||||
|
const pixelPoint = this.map!.latLngToContainerPoint(e.latlng);
|
||||||
|
pixelPoint.y += 75;
|
||||||
|
toView = this.map!.containerPointToLatLng(pixelPoint);
|
||||||
|
}
|
||||||
|
|
||||||
marker.closeTooltip();
|
marker.closeTooltip();
|
||||||
this.map?.setView(toView);
|
this.map?.setView(toView);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user