[Huawei Developers] Freemind R:
More information about the AppsUP contest, you can visit HUAWEI Developer Forum.​

The AppsUP contest has already been online. Maybe many developers encounter the following questions in the process. Today I want to share the frequently asked questions of Map Kit with you. Hope they can help you.

Q: Can I transfer a mark in Google Map to HUAWEI Map?

A: The mark in Google Map cannot be transferred to HUAWEI Map as Google Map does not support data export.

Q: Huawei map not working after upload the app to Huawei gallery. If i installed the same apk directly to phone everything working perfectly.

A: The fingerprint signatures of the two apps are different. That means you can use them separately.

Q: I am using HMS Map kit in my application when i open the particular activity. i am getting some messages repeatedly and UI is getting hanged and ANR is happening.

A: This issue can occur when the UI thread is blocked.

There could be below reasons for this issue:

1> Not using the MapAsync for handlling the callback.

2> While using the MapInitializer, context is null.

3> This provided URL is not correct.

Please check below for the reference

https://developer.huawei.com/consumer/en/doc/development/HMS-References/hms-map-mapsinitializer

https://developer.huawei.com/consumer/en/doc/development/HMS-References/hms-map-return-codes

Q: Map is not rendering and displays white screen returns http status code 502

A: If HTTP status code 502 is returned, a network error has occurred. Check your network environment.

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/open-platform-error-0000001050121484-V5

Q: I find gesturing on Map Kit a bit difficult? Is there a solution to make the gesturing similar to what is available on the Google Maps?

A: Some check points for you:

1. Please download sample code and use SupportMapFragment by referring to sample code. Link: https://developer.huawei.com/consumer/en/doc/development/HMS-Examples/hms-map-v4-example

2. Also please update the HMS Core version to the lastest and try.

Q: I followed tutorial about Map Kit , i check everything are same with the tutorial but , my map still blank

A: 1. Check wether you declared app id in manifest.xml file; 2. Enable map service in AGC.

Q: Is it possible to tilt the map more than 45 degrees?

A: Different tilt angles are required for different zoom levels.

when zoom < 10: it not allowed to tilt.

when zoom >= 10: 0 <= tilt <= 45.

So when you set tile to 70f, it can be max to 45f.

Q: I am developing an app with flutter and I decided to link it to a map kit, I followed the documentation and I still get this black screen that shows blank cells and I can't fix this problem

A: You probably haven't set up your signature certificate fingerprint

Please have a look at this guide:

https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/config-agc-0000001050296920

Q: map kit 'integrated with flutter' doesn't work with all mobile phones

A: For the build apk, you should config your build.gradle like this (https://forums.developer.huawei.com/forumPortal/en/topicview?tid=0201289420207900111&fid=0101187876626530001)

Q: I couldn't find the complete list of mapFeatures in MapStyle JSON. Can I know where can I obtain the MapStyle JSON with all the mapFeatures?

A: You can refer to the official website:

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-sdk-map-style-customization-0000001050728424

There is also a Style Editor that can be used to generate the JSON files in a quick manner located at the bottom of the documentation.

Q: How to convert from com.huawei.hms.maps.model.PointOfInterest to com.huawei.hms.site.api.model.Site ?

A: You can use the Site Kit Place Details to obtain the site for a given POI

<p style="line-height: 1.5em;">override fun onPoiClick(poi: PointOfInterest) {

//Obtain a Search service Instance
val searchService = SearchServiceFactory.create(requireContext(),
URLEncoder.encode(API_KEY, "UTF-8") )

//Create the request for the given POI
val request = DetailSearchRequest()
request.setSiteId(poi.placeId)

// Create a search result listener.
val resultListener =
object : SearchResultListener<DetailSearchResponse?> {
// Return search results upon a successful search.
override fun onSearchResult(result: DetailSearchResponse?) {
var site: Site?=null
if (result == null || result.site.also { site = it } == null) {
return
}
//here you can get the site information
Log.i("SITE","${site?.formatAddress}")
}

// Return the result code and description upon a search exception.
override fun onSearchError(status: SearchStatus) {
Log.e(
"TAG",
"Error : " + status.errorCode + " " + status.errorMessage
)
}
}

searchService.detailSearch(request, resultListener)
}</p>

You can check the guide here:

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/android-sdk-place-details-0000001050156636-V5

More information like above, follow me. You can get the updated collection about HMS Kits.

Any doubts or questions about this, you can leave your comment below.