Package org.kissweb.googleMapsAPI
Class GoogleTimeZone
java.lang.Object
org.kissweb.googleMapsAPI.GoogleTimeZone
This class returns the timezone ID associated with a latitude/longitude.
Author: Blake McBride
Date: 3/5/22
Author: Blake McBride
Date: 3/5/22
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getTimezone
(double latitude, double longitude) Perform a timezone query.static String
getTimezone
(String address) Perform a timezone query based on an address.static String
Perform a timezone query based on an address broken into its parts.
-
Constructor Details
-
GoogleTimeZone
public GoogleTimeZone()
-
-
Method Details
-
getTimezone
Perform a timezone query.
Example:String timezoneID = GoogleMapsAPI.getTimezone(38.234567, -85.003456);
- Parameters:
latitude
- latitudelongitude
- longitude- Returns:
- timeZoneId
- Throws:
IOException
-
getTimezone
Perform a timezone query based on an address.
Example:String timezoneID = GoogleMapsAPI.getTimezone("1600 Amphitheatre Parkway, Mountain View, CA");
- Parameters:
address
- address- Returns:
- timeZoneId
- Throws:
IOException
-
getTimezone
public static String getTimezone(String street1, String street2, String city, String state, String zip) throws IOException Perform a timezone query based on an address broken into its parts.
Example:String timezoneID = GoogleMapsAPI.getTimezone("1600 Amphitheatre Parkway", null, "Mountain View", "CA", "94043");
- Parameters:
street1
- street address 1street2
- street address 2 (optional)city
- citystate
- statezip
- zip code (optional)- Returns:
- timeZoneId
- Throws:
IOException
-