GoogleMaps
The GoogleMaps Service provides access to the Google Maps API along with helper functions for interacting with the maps (such as converting coordinates). For more information, check out https://developers.google.com/maps/documentation/static-maps/intro
Terms of use: https://developers.google.com/maps/terms
RPCS
- GoogleMaps.getDistance(startLatitude: Latitude, startLongitude: Longitude, endLatitude: Latitude, endLongitude: Longitude)
Get the straight line distance between two points in meters.
Arguments:
startLatitude: Latitude
(Latitude) - Latitude of start pointstartLongitude: Longitude
(Longitude) - Longitude of start pointendLatitude: Latitude
(Latitude) - Latitude of end pointendLongitude: Longitude
(Longitude) - Longitude of end point
Returns:
Number
(Number) - Distance in meters
- GoogleMaps.getEarthCoordinates(x: Number, y: Number)
Get the earth coordinates
[latitude, longitude]
of a given point in the last requested map image[x, y]
.Arguments:
Returns:
List
(List) - A list containing the latitude and longitude of the given point.
- GoogleMaps.getImageCoordinates(latitude: Latitude, longitude: Longitude)
Get the image coordinates
[x, y]
of a given location on the earth[latitude, longitude]
.Arguments:
latitude: Latitude
(Latitude) - latitude of the pointlongitude: Longitude
(Longitude) - longitude of the point
Returns:
List
(List) - A list containing the[x, y]
position of the given point.
- GoogleMaps.getLatitudeFromY(y: Number)
Convert y value of map image to latitude.
Arguments:
y: Number
(Number) - y value of map image
Returns:
Latitude
(Latitude) - Latitude of they
value from the image
- GoogleMaps.getLongitudeFromX(x: Number)
Convert x value of map image to longitude.
Arguments:
x: Number
(Number) - x value of map image
Returns:
Longitude
(Longitude) - Longitude of the x value from the image
- GoogleMaps.getMap(latitude: Latitude, longitude: Longitude, width: BoundedInteger<1>, height: BoundedInteger<1>, zoom: BoundedInteger<1, 25>)
Get a map image of the given region.
Arguments:
latitude: Latitude
(Latitude) - Latitude of center pointlongitude: Longitude
(Longitude) - Longitude of center pointwidth: BoundedInteger<1>
(BoundedInteger) - Image widthheight: BoundedInteger<1>
(BoundedInteger) - Image heightzoom: BoundedInteger<1, 25>
(BoundedInteger) - Zoom level of map image
Returns:
Image
(Image) - Map image
- GoogleMaps.getSatelliteMap(latitude: Latitude, longitude: Longitude, width: BoundedInteger<1>, height: BoundedInteger<1>, zoom: BoundedInteger<1, 25>)
Get a satellite map image of the given region.
Arguments:
latitude: Latitude
(Latitude) - Latitude of center pointlongitude: Longitude
(Longitude) - Longitude of center pointwidth: BoundedInteger<1>
(BoundedInteger) - Image widthheight: BoundedInteger<1>
(BoundedInteger) - Image heightzoom: BoundedInteger<1, 25>
(BoundedInteger) - Zoom level of map image
Returns:
Image
(Image) - Map image
- GoogleMaps.getTerrainMap(latitude: Latitude, longitude: Longitude, width: BoundedInteger<1>, height: BoundedInteger<1>, zoom: BoundedInteger<1, 25>)
Get a terrain map image of the given region.
Arguments:
latitude: Latitude
(Latitude) - Latitude of center pointlongitude: Longitude
(Longitude) - Longitude of center pointwidth: BoundedInteger<1>
(BoundedInteger) - Image widthheight: BoundedInteger<1>
(BoundedInteger) - Image heightzoom: BoundedInteger<1, 25>
(BoundedInteger) - Zoom level of map image
Returns:
Image
(Image) - Map image
- GoogleMaps.getXFromLongitude(longitude: Longitude)
Convert longitude to the x value on the map image.
Arguments:
longitude: Longitude
(Longitude) - Longitude coordinate
Returns:
Number
(Number) - Map x coordinate of the given longitude
- GoogleMaps.getYFromLatitude(latitude: Latitude)
Convert latitude to the y value on the map image.
Arguments:
latitude: Latitude
(Latitude) - Latitude coordinate
Returns:
Number
(Number) - Map y coordinate of the given latitude
- GoogleMaps.maxLatitude()
Get the maximum latitude of the current map.
Returns:
Longitude
(Longitude)
- GoogleMaps.maxLongitude()
Get the maximum longitude of the current map.
Returns:
Longitude
(Longitude)