How to show info wndow on marker in here map SDK 3.6

淺唱寂寞╮ 提交于 2019-12-07 12:03:26

The infoBubble in the HEREMobileSDK was deprecated for quite a long time already. In the deprecation message it was suggested to switch over to MapOverlay: https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html

So, what does this mean: Instead of showing a quite static/predefined infobubble from the HERE mSDK, you should use MapOverlay, that let you add complete View objects (Android Views) as an overlay to a pinned position on the map.

In your case, you might want to listen for the marker click event, and if this happens, then you add a Android View that looks how you want it as a MapOverlay to the map. The Map overlay is constructed like this: MapOverlay (View view, GeoCoordinate coordinate) and will be pinned to that given position.

Keep a reference to the MapOverlay, since you need to handle on your own when it should appear and disappear.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!