我想在Android上实现信息泡泡,我指的是https://developer.here.com/documentation/android-starter/api_reference_java/com/here/android/mpa/mapping/MapMarker.html#showInfoBubble--
但是我的对象没有返回成员函数 enter image description here
答案 0 :(得分:0)
正如评论中已经提到的,HERE Mobile Premium SDK不支持InfoBubble,但HERE Starter SDK支持它,但是Starter SDK现在已被弃用。
在Android上,HERE Mobile Premium SDK的替代方法是MapOverlay类(documentation)
private Button button;
private void onMapFragmentInitializationCompleted() {
// retrieve a reference of the map from the map fragment
map = mapFragment.getMap();
// Set the map center coordinate to the Vancouver region (no animation)
map.setCenter(new GeoCoordinate(49.196261, -123.004773, 0.0),
Map.Animation.NONE);
// Set the map zoom level to the average between min and max (no
// animation)
map.setZoomLevel((map.getMaxZoomLevel() + map.getMinZoomLevel()) / 2);
// create the button
button = new Button(this);
button.setText("TEST");
// create overlay and add it to the map
map.addMapOverlay(
new MapOverlay(button,
new GeoCoordinate(37.77493, -122.419416, 0.0)));