Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 788 Bytes

places-getting-started.md

File metadata and controls

23 lines (15 loc) · 788 Bytes

Getting started

1. # for a Mapzen API key

# for an API key from the Mapzen developer portal.

Set API key using a string resource

You can set your Mapzen API key via an XML string resource. Add a file app/src/main/res/values/mapzen.xml and copy the following code.

<resources>
    <string name="mapzen_api_key">your-mapzen-api-key</string>
</resources>

Set API key using MapzenManager class

Alternatively you can set your Mapzen API key via the MapzenManager class. Just make sure you call the following method prior to calling MapView#getMapAsyc(...) or creating an instance of MapzenSearch or MapzenRouter.

MapzenManager.instance(context).setApiKey("your-mapzen-api-key");