Hi, I'm building a nextjs app based on of MapkitJS.
I tried to pass a new value to cameraZoomRange
like the code below. As long as I put in this part map.cameraZoomRange
, the error shows up. Not sure it's my fault, or the bug of MapkitJS.
const map = new window.mapkit.Map(element, {
colorScheme: mqMatchLightTheme
? window.mapkit.Map.ColorSchemes.Light
: window.mapkit.Map.ColorSchemes.Dark,
showsCompass: window.mapkit.FeatureVisibility.Hidden,
showsMapTypeControl: false,
showsZoomControl: false,
showsUserLocation: true,
tracksUserLocation: true,
isRotationEnabled: true,
isZoomEnabled: true,
});
map.cameraZoomRange = new window.mapkit.CameraZoomRange({
minCameraDistance: 14,
maxCameraDistance: Infinity,
});