Norway


Currently position of in map at center always. Please check screen 1 for that.

I want to fix the camera to with offset, just like screen 2.

Any help will be greatly appreciated.

let carBearing = self.getBearingBetweenTwoCoordinates(coordinate1: coordinate1, coordinate2: coordinate2)

self.carMarker.position = coordinate1

let camera = GMSCameraPosition.camera(withTarget: coordinate1, zoom: Constants.GoogleMapInfo.KZOOM_LEVEL_20, bearing: carBearing, viewingAngle: 65)

DispatchQueue.main.async{
    self.mapView.animate(to: camera)
}

Thanks

Screen 1  - Qt4CK - swift – Move camera to bottom GMSMapView IOS

Screen 2  - F5Fx0 - swift – Move camera to bottom GMSMapView IOS



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here