There are multiple ways to control the Camera Position in Mappls SDKs. Following are the methods tha you can use:
This method allows to move the camera towards the target location.
mapplsMap.moveCamera(CameraUpdateFactory.newLatLng(LatLng(latitude, longitude)))mapplsMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(latitude, longitude)));This method allows to move the camera towards the target location with a fixed zoom.
mapplsMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(latitude, longitude), zoom))mapplsMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), zoom));This method allows to move the camera towards the target location with padding.
mapplsMap.moveCamera(CameraUpdateFactory.newLatLngPadding(LatLng(latitude, longitude), left, top, right, bottom))mapplsMap.moveCamera(CameraUpdateFactory.newLatLngPadding(new LatLng(latitude, longitude), left, top, right, bottom));This method allows to move the camera towards the target location with view bounds.
val latLngBounds = LatLngBounds.Builder()
.include(LatLng(lat1, lng1))
.include(LatLng(lat2, lng2))
.build()
mapplsMap.moveCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds, left, top, right, bottom))LatLngBounds latLngBounds = new LatLngBounds.Builder()
.include(new LatLng(lat1, lng1))
.include(new LatLng(lat2, lng2))
.build();
mapplsMap.moveCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds, left, top, right, bottom));This method allows to zoom the camera to a particular zoom-level. Example, 18/14 etc.
mapplsMap.moveCamera(CameraUpdateFactory.zoomTo(zoom)) mapplsMap.moveCamera(CameraUpdateFactory.zoomTo(zoom));This method allows to zoom the camera to a particular zoom by some amount of zoom level
mapplsMap.moveCamera(CameraUpdateFactory.zoomBy(2.0))mapplsMap.moveCamera(CameraUpdateFactory.zoomBy(2.0));This method allows to zoom in.
mapplsMap.moveCamera(CameraUpdateFactory.zoomIn())mapplsMap.moveCamera(CameraUpdateFactory.zoomIn()); This method allows to zoom out.
mapplsMap.moveCamera(CameraUpdateFactory.zoomOut())mapplsMap.moveCamera(CameraUpdateFactory.zoomOut());This method allows to zoom with respect to the bearing.
mapplsMap.moveCamera(CameraUpdateFactory.bearingTo(bearing))mapplsMap.moveCamera(CameraUpdateFactory.bearingTo(bearing));This method allows you to tilt the camera to specefic tilt in degrees eg.,20.
mapplsMap.moveCamera(CameraUpdateFactory.tiltTo(tilt))mapplsMap.moveCamera(CameraUpdateFactory.tiltTo(tilt));This method allows to move the camera towards the location with padding.
mapplsMap.moveCamera(CameraUpdateFactory.paddingTo(left, top, right, bottom))mapplsMap.moveCamera(CameraUpdateFactory.paddingTo(left, top, right, bottom));For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!
