public class GeocoderBuilder extends Object
GeocodingAPI
GeocodingAPI geocoder = new GeocoderBuilder()
//path to ggs runtime resources, this will be located under ggs distribution
.withConfiguration(Paths.get("{directory}/ga-sdk-dist-{version}/resources"))
// This is where you can set default preferences. If this is not set, the default preferences would be used from
// configuration file: {directory}/ga-sdk-dist-{version}/resources/config/geocodePreferences.xml
.withPreferences(new GeocoderPreferences())
.build();
| Constructor and Description |
|---|
GeocoderBuilder() |
| Modifier and Type | Method and Description |
|---|---|
GeocodingAPI |
build()
This will build and return an instance
GeocodingAPI based of the configuration. |
GeocoderBuilder |
withConfiguration(com.pb.geocoding.config.api.GeocodingConfiguration configuration)
Provide
GeocodingConfiguration assembled by ConfigurationBuilder |
GeocoderBuilder |
withConfiguration(Path resources)
Provide runtime resources location for SDK
|
GeocoderBuilder |
withPreferences(Preferences preferences)
This is where you can set default preferences.
|
public GeocoderBuilder withConfiguration(Path resources) throws GeocodingException
resources - path to runtime resources /ga-sdk-dist-{version}/resourcesGeocoderBuilderGeocodingExceptionpublic GeocoderBuilder withConfiguration(com.pb.geocoding.config.api.GeocodingConfiguration configuration) throws GeocodingException
GeocodingConfiguration assembled by ConfigurationBuilderconfiguration - configuration for geocoder build using ConfigurationBuilderGeocoderBuilderGeocodingExceptionpublic GeocoderBuilder withPreferences(Preferences preferences) throws GeocodingException
preferences - default preferences that must be used if user does not provide request
specific preferencesGeocoderBuilderGeocodingExceptionpublic GeocodingAPI build() throws GeocodingException
GeocodingAPI based of the configuration.GeocodingAPIGeocodingExceptionCopyright © 2024. All rights reserved.