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 .. toctree:: :maxdepth: 2 :titlesonly: :caption: RPC Categories RPCS ---- .. function:: 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 point - ``startLongitude: Longitude`` (`Longitude `__) - Longitude of start point - ``endLatitude: Latitude`` (`Latitude `__) - Latitude of end point - ``endLongitude: Longitude`` (`Longitude `__) - Longitude of end point **Returns:** ``Number`` (`Number `__) - Distance in meters .. function:: 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:** - ``x: Number`` (`Number `__) - x position of the point - ``y: Number`` (`Number `__) - y position of the point **Returns:** ``List`` (`List `__) - A list containing the latitude and longitude of the given point. .. function:: 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 point - ``longitude: Longitude`` (`Longitude `__) - longitude of the point **Returns:** ``List`` (`List `__) - A list containing the ``[x, y]`` position of the given point. .. function:: 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 the ``y`` value from the image .. function:: 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 .. function:: 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 point - ``longitude: Longitude`` (`Longitude `__) - Longitude of center point - ``width: BoundedInteger<1>`` (`BoundedInteger `__) - Image width - ``height: BoundedInteger<1>`` (`BoundedInteger `__) - Image height - ``zoom: BoundedInteger<1, 25>`` (`BoundedInteger `__) - Zoom level of map image **Returns:** ``Image`` (`Image `__) - Map image .. function:: 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 point - ``longitude: Longitude`` (`Longitude `__) - Longitude of center point - ``width: BoundedInteger<1>`` (`BoundedInteger `__) - Image width - ``height: BoundedInteger<1>`` (`BoundedInteger `__) - Image height - ``zoom: BoundedInteger<1, 25>`` (`BoundedInteger `__) - Zoom level of map image **Returns:** ``Image`` (`Image `__) - Map image .. function:: 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 point - ``longitude: Longitude`` (`Longitude `__) - Longitude of center point - ``width: BoundedInteger<1>`` (`BoundedInteger `__) - Image width - ``height: BoundedInteger<1>`` (`BoundedInteger `__) - Image height - ``zoom: BoundedInteger<1, 25>`` (`BoundedInteger `__) - Zoom level of map image **Returns:** ``Image`` (`Image `__) - Map image .. function:: 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 .. function:: 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 .. function:: GoogleMaps.maxLatitude() Get the maximum latitude of the current map. **Returns:** ``Longitude`` (`Longitude `__) .. function:: GoogleMaps.maxLongitude() Get the maximum longitude of the current map. **Returns:** ``Longitude`` (`Longitude `__) .. function:: GoogleMaps.minLatitude() Get the minimum latitude of the current map. **Returns:** ``Longitude`` (`Longitude `__) .. function:: GoogleMaps.minLongitude() Get the minimum longitude of the current map. **Returns:** ``Longitude`` (`Longitude `__)