Get started with Location Library
Get started with Location Library
To get started with the Location Library, follow the steps below.
Get your credentials
For instructions on how to authenticate with the platform, see the Get Your Credentials section of the SDK for Java & Scala.
Configure your environment
For instructions about how to configure your environment, see the Configure Your Environment section of the SDK for Java & Scala.
Manage dependencies
To run the code snippets in this document using Maven, make sure you follow the instructions on how to manage dependencies in the Include the SDK in Your Project section of the SDK for Java & Scala.
Catalogs HRNs and versions
Several code snippets in this document load data from catalogs. To refer to a catalog, these code snippets must provide the HRN and the version of this catalog. Instead of using hard-coded values for HRNs and versions of catalogs, the code snippets use constants defined as follows:
import com.here.platform.location.integration.heremapcontent.HereMapContent
import com.here.platform.location.integration.optimizedmap.OptimizedMap
// Optimized Map For Location Library
val optimizedMapHRN = OptimizedMap.v2.HRN
val optimizedMapVersion = 8240L
// HERE Map Content
val hereMapContentHRN = HereMapContent.v2.HRN
val hereMapContentVersion = 8287Limport com.here.hrn.HRN;
import com.here.platform.location.core.geospatial.BoundingBox;
import com.here.platform.location.core.geospatial.GeoCoordinate;
import com.here.platform.location.inmemory.graph.Edge;
import com.here.platform.location.inmemory.graph.Vertex;
import com.here.platform.location.integration.heremapcontent.HereMapContent;
import com.here.platform.location.integration.optimizedmap.OptimizedMap;
// Optimized Map for Location Library
final HRN optimizedMapHRN = OptimizedMap.v2.HRN;
final long optimizedMapVersion = 8240L;
// HERE Map Content
final HRN hereMapContentHRN = HereMapContent.v2.HRN;
final long hereMapContentVersion = 8287L;You can find the HRN and the latest version of catalogs such as the
Optimized Map for Location Library
in the Overview of the Catalog.
Code examples
You can find the Location Library code examples in our Workspace Examples GitHub repository.
Updated 18 days ago