Creating a simple application with Deep Map™ is simpler than you might think. To begin, you will need the following files:
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" :
Note: 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:
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:
We also need to add our map file (DeepMap.zip) as a resource for our app. Just copy your DeepMap.zip 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:
Then open the main activity MainDeepmapActivity.java. 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:
That's it! Now start the app on your device or in the emulator, and you will be able to view our example map.