HMS-Core / hms-mapkit-demo

HMS Map Kit demo provides an example of intergrating HMS Map Android SDK. Personalizing how your map displays and interacts with your users tailors their experience to them
https://developer.huawei.com/consumer/en/hms/huawei-MapKit?ha_source=hms1
Apache License 2.0
115 stars 43 forks source link
android hms huawei java map marker route

HMS Core Map Kit Sample Code

Apache-2.0

English | 中文

Contents

Introduction

Map Kit allows you to customize your map display and the way for users to interact with your map, tailoring map use experience for your users. This can make location-based services in your app work better, empowering users to better use your app.

Map Kit uses the WGS 84 GPS coordinate system, which meets most map development requirements outside China, including:

You can also use HMS Toolkit to quickly run the sample code. HMS Toolkit supports one-stop kit integration, and provides functions such as free app debugging on remote real devices. To learn more about HMS Toolkit, please refer to the HMS Toolkit documentation.

Preparations

The sample code is built using Gradle to demonstrate how to use the Map SDK for Android.

First, download the sample code by cloning this repository or downloading the compressed package.

In Android Studio, click Open an existing Android Studio project and select the directory where the map-sample file is located.

You can use the gradlew build command to directly build the project.

Then, you need to create an app in AppGallery Connect, obtain the agconnect-services.json file, and add it to the project. You also need to generate a signing certificate fingerprint, add the signing certificate file to the project, and add related configurations to the build.gradle file. For details, please refer to Configuring App Information in AppGallery Connect.

To learn more, refer to the following documents:

Environment Requirements

It is recommended that the Android SDK version be 19 or later, and the JDK version be 1.8 or later.

Result

Technical Support

You can visit the Reddit community to obtain the latest information about HMS Core and communicate with other developers.

If you have any questions about the sample code, try the following:

If you encounter any issues when using the sample code, submit your issues or submit a pull request.

License

The sample code is licensed under Apache License 2.0.