From 5184f2da0b6b549e97d97b587969be2644123219 Mon Sep 17 00:00:00 2001 From: Khaled Sakr Date: Tue, 27 May 2025 14:19:04 +0200 Subject: [PATCH] feat(heremap): enable fractional zoom when using vector tiles --- src/HEREMap.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/HEREMap.tsx b/src/HEREMap.tsx index 9029af2..96807fa 100644 --- a/src/HEREMap.tsx +++ b/src/HEREMap.tsx @@ -172,7 +172,7 @@ export const HEREMap = forwardRef(({ topLeft.walk(BEARING_TOP_LEFT, distance), bottomRight.walk(BEARING_BOTTOM_RIGHT, distance), ) - if (viewBounds) { map.getViewModel().setLookAtData({ bounds: viewBounds }, animate, true) } + if (viewBounds) { map.getViewModel().setLookAtData({ bounds: viewBounds }, animate, !useVectorTiles) } } const zoomOnMarkers = (animate: number | boolean = true, group: string = 'default') => { @@ -272,7 +272,9 @@ export const HEREMap = forwardRef(({ const behavior = interactive ? new H.mapevents.Behavior(new H.mapevents.MapEvents(newMap)) : undefined if (behavior) { - behavior.disable(H.mapevents.Behavior.Feature.FRACTIONAL_ZOOM) + if (!useVectorTiles) { + behavior.disable(H.mapevents.Behavior.Feature.FRACTIONAL_ZOOM) + } // create the default UI for the map ui = H.ui.UI.createDefault(newMap, defaultLayersRef.current, getUILanguage(language))