class Geocoder extends AnyRef
Converts strings and addresses to latitude/longitude values.
Latitude/Longitude values can be queried with a formatted address. The Google Maps API is called using the values from the address and a com.koddi.geocoder.Result instance is returned.
- Alphabetic
- By Inheritance
- Geocoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Geocoder(apiUrl: String, apiKey: Option[String], parameters: Option[Parameters], responseParser: ResponseParser)
- apiUrl
the api endpoint used to send requests to
- apiKey
an optional key to use when making api requests
- parameters
global parameters to apply to every request
- responseParser
an XML parser used to deconstruct the API response
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
createURL(searchParam: String, searchValue: String): URL
- Attributes
- protected
-
def
doGetRequest(url: URL): Response
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lookup(components: Seq[AbstractComponent]): Seq[Result]
Query the Geocoder API using Component entities.
Query the Geocoder API using Component entities.
Components represent query parameters and are part of the Google Maps Geocing API. For simplicity predefined Component types are defined in com.koddi.geocoder.Component
-
def
lookup(latitude: Double, longitude: Double): Seq[Result]
Lookups an address given a location entity.
Lookups an address given a location entity.
A request to the Google Maps API is made to obtain the correct address value. This is extracted using
Address.fromString
from theformatted_address
property in the response.- returns
an sequence of Result objects containing location and geometry data
-
def
lookup(address: String): Seq[Result]
Lookups a latitude/longitude values for a given address.
Lookups a latitude/longitude values for a given address.
A request to the Google Maps API is made to obtain the correct latitude/longitude values.
- address
a formatted string containing the address, city, and state
- returns
an sequence of Result objects containing location and geometry data
-
def
lookupPlace(placeId: String): Seq[Result]
Query the Geocoder API using a Place ID
Query the Geocoder API using a Place ID
- See also
lookup(address, parameters)
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
sendRequest(searchParam: String, searchValue: String): Seq[Result]
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )