From e8fc5e675f7d12843f82b51013df7bed172e76d4 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Fri, 19 Feb 2021 14:24:20 +0300 Subject: [PATCH] [Vega] [Map] disable map rotation using right right click / touch rotation gesture --- .../vis_type_vega/public/vega_view/vega_map_view/view.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts b/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts index ca936cb49c7e0b3..b1ec79e6b8310e6 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts +++ b/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts @@ -144,6 +144,12 @@ export class VegaMapView extends VegaBaseView { if (this.shouldShowZoomControl) { mapBoxInstance.addControl(new NavigationControl({ showCompass: false }), 'top-left'); } + + // disable map rotation using right click + drag + mapBoxInstance.dragRotate.disable(); + + // disable map rotation using touch rotation gesture + mapBoxInstance.touchZoomRotate.disableRotation(); } private initLayers(mapBoxInstance: Map, vegaView: View) {