Package provided.owlMaps.general
Interface IPlace
- All Superinterfaces:
java.io.Serializable
public interface IPlace
extends java.io.Serializable
Represents a named location on a map with an associated default zoom level when viewing it.
Implementation note: Since the LatLng class is not Serializable, then a concrete IPlace
must store the latitude and longitude of the place, not a LatLng object.
- Author:
- swong
-
Method Summary
Modifier and Type Method Description double
getLat()
Get the latitude of the placeILatLng
getLatLng()
Convenience method to get the latitude and longitude of the place in the form of a LatLng object.double
getLng()
Get the longitude of the placejava.lang.String
getName()
Get the name of the placeint
getZoom()
Get the default zoom when viewing the placestatic IPlace
make(java.lang.String name, double lat, double lng, int zoom)
Make an IPlace instance from the given values
-
Method Details
-
getName
java.lang.String getName()Get the name of the place- Returns:
- The name of the place
-
getLat
double getLat()Get the latitude of the place- Returns:
- The latitude of the place
-
getLng
double getLng()Get the longitude of the place- Returns:
- The longitude of the place
-
getLatLng
ILatLng getLatLng()Convenience method to get the latitude and longitude of the place in the form of a LatLng object. Note that a new LatLng instance is returned with a default noWrap setting.- Returns:
- A new LatLng instance with this place's latitude and longitude.
-
getZoom
int getZoom()Get the default zoom when viewing the place- Returns:
- The default zoom level for this place
-
make
Make an IPlace instance from the given values- Parameters:
name
- the name of the placelat
- The latitude of the placelng
- The longitude of the placezoom
- The preferred zoom level to use when viewing the place- Returns:
- An IPlace instance
-