Get Started

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:

Scala
Java
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.China.HRN
val optimizedMapVersion = 8L

// HERE Map Content
val hereMapContentHRN = HereMapContent.v2.China.HRN
val hereMapContentVersion = 0L
import com.here.hrn.HRN;
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.China.HRN;
final long optimizedMapVersion = 8L;

// HERE Map Content
final HRN hereMapContentHRN = HereMapContent.v2.China.HRN;
final long hereMapContentVersion = 0L;

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.

Run the Examples

Before you run the Location Library examples, download the SDK zip file at https://platform.hereolp.cn/sdk. The examples/location directory contains the examples. For instructions on how to run them, see examples/location/README-cn.md.

results matching ""

    No results matching ""