UI: Fixed didn't tooltip show in Map widget at Safari browser

This commit is contained in:
Vladyslav_Prykhodko 2021-07-02 15:13:27 +03:00 committed by Andrew Shvayka
parent 3fc45654e8
commit 29d04ef792
5 changed files with 11 additions and 6 deletions

View File

@ -38,7 +38,8 @@ export class GoogleMap extends LeafletMap {
this.loadGoogle(() => {
const map = L.map($container, {
attributionControl: false,
editable: !!options.editablePolygon
editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
(L.gridLayer as any).googleMutant({
type: options?.gmDefaultMapType || 'roadmap'

View File

@ -23,7 +23,8 @@ export class HEREMap extends LeafletMap {
constructor(ctx: WidgetContext, $container, options: UnitedMapSettings) {
super(ctx, $container, options);
const map = L.map($container, {
editable: !!options.editablePolygon
editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
const tileLayer = (L.tileLayer as any).provider(options.mapProviderHere || 'HERE.normalDay', options.credentials);
tileLayer.addTo(map);

View File

@ -221,7 +221,8 @@ export class ImageMap extends LeafletMap {
zoom: 1,
crs: L.CRS.Simple,
attributionControl: false,
editable: !!this.options.editablePolygon
editable: !!this.options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
});
this.updateBounds(updateImage);
}

View File

@ -23,7 +23,8 @@ export class OpenStreetMap extends LeafletMap {
constructor(ctx: WidgetContext, $container, options: UnitedMapSettings) {
super(ctx, $container, options);
const map = L.map($container, {
editable: !!options.editablePolygon
editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
let tileLayer;
if (options.useCustomProvider) {

View File

@ -25,12 +25,13 @@ export class TencentMap extends LeafletMap {
super(ctx, $container, options);
const txUrl = 'http://rt{s}.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0';
const map = L.map($container, {
editable: !!options.editablePolygon
editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
const txLayer = L.tileLayer(txUrl, {
subdomains: '0123',
tms: true,
attribution: '©2020 Tencent - GS(2018)2236号- Data© NavInfo'
attribution: '©2021 Tencent - GS(2020)2236号- Data© NavInfo'
}).addTo(map);
txLayer.addTo(map);
super.initSettings(options);