The Mappls Maps Android SDK allows you to define interactions that you can activate on the map to enable gestures and click events. The following interactions are supported :
-
Zoom controls : The map supports the familiar two-finger pinch and zooms to change zoom level as well as double tap to zoom in.
-
Target : The target is single latitude and longitude coordinate that the camera centers it on. Changing the camera’s target will move the camera to the inputted coordinates. The target is a LatLng object. The target coordinate is always at the center of the viewport .
-
Tilt : Tilt is the camera’s angle from the nadir (directly facing the Earth) and uses unit degrees. The camera’s minimum (default) tilt is 0 degrees, and the maximum tilt is 60. Tilt levels use six decimal point of precision, which enables you to restrict/set/lock a map’s bearing with extreme precision.
-
Bearing : Bearing represents the direction that the camera is pointing in and measured in degrees *clockwise from north
-
Zoom : Zoom implies and controls scale of the map and consumes any value between 0 and 22. At zoom level 0, viewport shows continents and other world features. A middle value of 11 will show city level details.At a higher zoom level, map will begin to show buildings and points of interest.
Sdk provides a OnMapReadyCallback, implements this callback and override it’s onMapReady() and set the Camera position inside this method.
CameraPosition position = new CameraPosition.Builder()
.target(new LatLng(22.8978, 77.3245)) // Sets the new camera position
.zoom(14) // Sets the zoom to level 14
.tilt(45) // Set the camera tilt to 45 degrees
.build();
mapplsMap.setCameraPosition(position)
.