MapUtil

open class MapUtil

This is a utility class that performs various calculations related to maps. All methods are static so an instance of this class should not be created.

Functions

Link copied to clipboard
Calculates the angle and direction between 3 coordinates.
Link copied to clipboard
open fun averageOfCoordinates(coordinates: List<List<LatLng>>): LatLng
Averages the location for a list of coordinates
Link copied to clipboard
Calculates the distance between two LatLng coordinates.
Link copied to clipboard
Calculates the heading (bearing) between two coordinates
Link copied to clipboard
open fun locationWithOffset(source: LatLng, bearing: Float, distance: Double): LatLng
Calculates offset location given source location, heading (bearing), and distance.
Link copied to clipboard
open fun pointIsInMultiPolygon(vertices: List<List<LatLng>>, point: LatLng): Boolean
Link copied to clipboard
open fun tileBounds(x: Int, y: Int, zoom: Int): LatLngBounds
Calculates the tile bounds on a mercator projection given an x, y, and zoom.
Link copied to clipboard
Combine multiple coordinate bounds into a single one