PolyUtil

open class PolyUtil

Functions

Link copied to clipboard
open fun containsLocation(    @NonNull point: LatLng,     @NonNull polygon: List<LatLng>,     geodesic: Boolean): Boolean
Computes whether the given point lies inside the specified polygon.
Link copied to clipboard
@NonNull
open fun decode(@NonNull encodedPath: String): List<LatLng>
Decodes an encoded path string into a sequence of LatLngs.
Link copied to clipboard
@NonNull
open fun decodeAsArray(@NonNull encodedPath: String): Array<LatLng>
Decodes an encoded path string into a sequence of LatLngs.
Link copied to clipboard
open fun distanceToLine(    p: LatLng,     start: LatLng,     end: LatLng): Double
Computes the distance on the sphere between the point p and the line segment start to end.
Link copied to clipboard
@NonNull
open fun encode(@NonNull path: List<LatLng>): String
Encodes a sequence of LatLng into an encoded path string.
Link copied to clipboard
open fun isLocationOnEdge(    @NonNull point: LatLng,     @NonNull polygon: List<LatLng>,     geodesic: Boolean): Boolean
Same as isLocationOnEdge with a default tolerance of 0.1 meters.
open fun isLocationOnEdge(    @NonNull point: LatLng,     @NonNull polygon: List<LatLng>,     geodesic: Boolean,     tolerance: Double): Boolean
Computes whether the given point lies on or near the edge of a polygon, within a specified tolerance in meters.
Link copied to clipboard
open fun isLocationOnPath(    @NonNull point: LatLng,     @NonNull polyline: List<LatLng>,     geodesic: Boolean): Boolean
Same as isLocationOnPath with a default tolerance of 0.1 meters.
open fun isLocationOnPath(    @NonNull point: LatLng,     @NonNull polyline: List<LatLng>,     geodesic: Boolean,     tolerance: Double): Boolean
Computes whether the given point lies on or near a polyline, within a specified tolerance in meters.