Tuesday, 4 December 2018

Move camera to bottom GMSMapView IOS

Currently map is position camera to center always. Please check screen 1 for that. I want to fix the camera to bottom 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

Screen 2

Screen 1

Screen 2



from Move camera to bottom GMSMapView IOS

No comments:

Post a Comment