Closed AlmiranteTim closed 2 years ago
setCenter(center: { lon: number, lat: number }, zoom: number = 10, azimuth: number = 0, tilt: number = 0, duration: number = 0, animation: Animation = Animation.SMOOTH)
trry set Animation = .....
setCenter(center: { lon: number, lat: number }, zoom: number = 10, azimuth: number = 0, tilt: number = 0, duration: number = 0, animation: Animation = Animation.SMOOTH)
trry set Animation = .....
I tried Animation.SMOOTH and Animation.LINEAR It also doesn't work
mapYandexRef.setCenter({ lat: lat, lon: lng, zoom: 12, duration: 2000, animation: Animation.SMOOTH } )
mapYandexRef.current.setCenter({......
and try this the object inside round brackets must pe point type
This code work:
this.map.current.setCenter( {...this.state.marker}, 16.5, 0, 0, 0.1, Animation.LINEAR, );
Your code must be like this:
mapYandexRef.current.setCenter({ lat: lat, lon: lng}, zoom: 12, duration: 2000, animation: Animation.SMOOTH )
and try this the object inside round brackets must pe point type
This code work:
this.map.current.setCenter( {...this.state.marker}, 16.5, 0, 0, 0.1, Animation.LINEAR, );
Your code must be like this:
mapYandexRef.current.setCenter({ lat: lat, lon: lng}, zoom: 12, duration: 2000, animation: Animation.SMOOTH )
Thank you, it works: mapYandexRef.setCenter( { lat: lat, lon: lng }, 12, 0, 0, 0.3, Animation.LINEAR, );