public class GoogleMaps
extends java.lang.Object
Circle}
,
Shape}
,
Place}
Modifier and Type | Class and Description |
---|---|
static class |
GoogleMaps.Circle
A map item that represents a circle.
|
static class |
GoogleMaps.MapItem
An abstract class used to group an array of map items.
|
static class |
GoogleMaps.Place
A map item that represents a place in the map.
|
static class |
GoogleMaps.Shape
A map item that represents a polygon with any shape.
|
Modifier and Type | Field and Description |
---|---|
static int |
SHOW_SATELLITE_PHOTOS
Used in the flags argument of showRoute: shows the satellite photos.
|
static int |
USE_WAZE
Used in the flags argument of showRoute: use waze to show the route of the current location to a target
address.
|
Constructor and Description |
---|
GoogleMaps() |
Modifier and Type | Method and Description |
---|---|
static double[] |
getLocation(java.lang.String address)
Returns the location after searching Google.
|
static boolean |
showAddress(java.lang.String address,
boolean showSatellitePhotos)
Shows the given address in a separate viewer.
|
static boolean |
showMap(GoogleMaps.MapItem[] items,
boolean showSatellitePhotos)
Shows an array of MapItem elements in the map.
|
static boolean |
showRoute(java.lang.String addressI,
java.lang.String addressF,
java.lang.String traversedPoints,
boolean showSatellitePhotos)
Deprecated.
|
static boolean |
showRoute(java.lang.String addressI,
java.lang.String addressF,
java.lang.String traversedPoints,
int flags)
Shows the route between two points.
|
public static final int SHOW_SATELLITE_PHOTOS
public static final int USE_WAZE
public static boolean showAddress(java.lang.String address, boolean showSatellitePhotos)
address
- The address (WITHOUT ACCENTUATION) to show (E.G.: "rua tonelero 10, copacabana, rio de janeiro, brasil", or "22030,brasil").
The address is resolved and its latitude and logitude coordinates are retrieved.
Careful with the address given, be sure to make some tests before. To remove accentuation, you can use Convert.removeAccentuation.
If you want to pass the lat/lon coordinates, pass them in the form: "@lat,lon" (E.G.: "@-22.966000,-43.185000").
Note that, due to Android's restrictions, only the first 6 decimal digits in the coordinates are used.
Passing an empty string will make the engine search for a valid "last known position". If there's no such position,
it will return false.showSatellitePhotos
- If true, an image of the satellite is combined with the map. May require more
bandwidth and internet resources.Convert.removeAccentuation(String)
@Deprecated public static boolean showRoute(java.lang.String addressI, java.lang.String addressF, java.lang.String traversedPoints, boolean showSatellitePhotos) throws NotInstalledException
NotInstalledException
showRoute(String, String, String, int)
public static boolean showRoute(java.lang.String addressI, java.lang.String addressF, java.lang.String traversedPoints, int flags) throws NotInstalledException
NotInstalledException
Convert.removeAccentuation(String)
public static boolean showMap(GoogleMaps.MapItem[] items, boolean showSatellitePhotos)
Circle}
,
Shape}
,
Place}
public static double[] getLocation(java.lang.String address) throws IOException, InvalidNumberException
IOException
InvalidNumberException