Getting started with Map v2

Creating a simple application with Deep Map™ is simpler than you might think. To begin, you will need the following files:

  • hdm-mapcore-lib-release.aar -  the main library for the Deep Map™ 2.0 SDK

  • - contains the map file, styling, routing-database, textures and more

You can find the above files inside the SDK packages in the Download section. Mind that this section of our website is password protected - please contact us to get your credentials!

For the purpose of this tutorial, we will use a simple project with “Empty Activity” :

../../_images/new-project.png ../../_images/new-project-target-devices.png ../../_images/new-project-add-activity.png ../../_images/new-project-customize-activity.png


You can use minimum SDK version 16 and up.

Add a new module to the project (File > Project Structure > ‘+’ in the top left corner) and select “Import .JAR/.AAR Package”. Find the file hdm-mapcore-lib.aar and add it as module.

Next we add our library to the app by adding it to the Modules list of our app in the Project Structure window:

../../_images/new-module.png ../../_images/project-structure.png

Unfortunately, including an AAR package does not include its dependencies automatically. To add those, open the build.gradle of your app and add the following dependencies:


dependencies {
    compile ''
    compile 'com.googlecode.plist:dd-plist:1.16'
    compile 'com.squareup.okhttp:okhttp:2.5.0'

We also need to add our map file ( as a resource for our app. Just copy your to the assets folder in your project.


In order to show the map, a MapView must be set.


Open the activities layout and add the MapFragment to layout:


<fragment android:name=""
    android:layout_height="match_parent" />

Then open the main activity Again, to keep it simple for the scope of the tutorial, we just find MapFragment in layout and load the map data. All you have to do for that to work is the following:



public class MainDeepmapActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {

        MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(;

        mapFragment.loadMap(new MapView.ReadyDelegate() {
            public void onReady(MapView mapView) {
            /* */

That’s it! Now start the app on your device or in the emulator, and you will be able to view our example map.