Here Map Premium plan Map.InfoBubbleAdapter() ,hideInfoBubble ,getInfoBubbleContents and isInfoBubbleVisible...
up vote
0
down vote
favorite
I am trying to show the custom layout when user clicks on the marker object.
The basic pack code works properly .
However when i shifted to premium pack it does not have
Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.
I am not even able to open the infoBubble when user click on marker too.
This is the code for custom view in basic pack i used.
hereMap.get(new Map.InfoBubbleAdapter() {
@Override
public View getInfoBubbleContents(MapMarker mapMarker2) {
return null;
}
@Override
public View getInfoBubble(MapMarker mapMarker2) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
TextView infoWindowText = view.findViewById(R.id.infoMessage);
infoWindowText.setText(mapMarker2.getTitle());
return view;
}
});
and this is the code that i was using on click of marker
@Override
public boolean onMapObjectsSelected(List<ViewObject> objects) {
for (ViewObject object : objects) {
if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
MapMarker mapMarker = (MapMarker) object;
System.out.println("Title is................." + mapMarker.getTitle());
if (!mapMarker.isInfoBubbleVisible()) {
mapMarker.getInfoBubbleContents();
} else {
mapMarker.hideInfoBubble();
}
return true;
}
}
How can i show the custom info bubble when user click on the marker?
android here-api
add a comment |
up vote
0
down vote
favorite
I am trying to show the custom layout when user clicks on the marker object.
The basic pack code works properly .
However when i shifted to premium pack it does not have
Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.
I am not even able to open the infoBubble when user click on marker too.
This is the code for custom view in basic pack i used.
hereMap.get(new Map.InfoBubbleAdapter() {
@Override
public View getInfoBubbleContents(MapMarker mapMarker2) {
return null;
}
@Override
public View getInfoBubble(MapMarker mapMarker2) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
TextView infoWindowText = view.findViewById(R.id.infoMessage);
infoWindowText.setText(mapMarker2.getTitle());
return view;
}
});
and this is the code that i was using on click of marker
@Override
public boolean onMapObjectsSelected(List<ViewObject> objects) {
for (ViewObject object : objects) {
if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
MapMarker mapMarker = (MapMarker) object;
System.out.println("Title is................." + mapMarker.getTitle());
if (!mapMarker.isInfoBubbleVisible()) {
mapMarker.getInfoBubbleContents();
} else {
mapMarker.hideInfoBubble();
}
return true;
}
}
How can i show the custom info bubble when user click on the marker?
android here-api
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to show the custom layout when user clicks on the marker object.
The basic pack code works properly .
However when i shifted to premium pack it does not have
Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.
I am not even able to open the infoBubble when user click on marker too.
This is the code for custom view in basic pack i used.
hereMap.get(new Map.InfoBubbleAdapter() {
@Override
public View getInfoBubbleContents(MapMarker mapMarker2) {
return null;
}
@Override
public View getInfoBubble(MapMarker mapMarker2) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
TextView infoWindowText = view.findViewById(R.id.infoMessage);
infoWindowText.setText(mapMarker2.getTitle());
return view;
}
});
and this is the code that i was using on click of marker
@Override
public boolean onMapObjectsSelected(List<ViewObject> objects) {
for (ViewObject object : objects) {
if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
MapMarker mapMarker = (MapMarker) object;
System.out.println("Title is................." + mapMarker.getTitle());
if (!mapMarker.isInfoBubbleVisible()) {
mapMarker.getInfoBubbleContents();
} else {
mapMarker.hideInfoBubble();
}
return true;
}
}
How can i show the custom info bubble when user click on the marker?
android here-api
I am trying to show the custom layout when user clicks on the marker object.
The basic pack code works properly .
However when i shifted to premium pack it does not have
Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.
I am not even able to open the infoBubble when user click on marker too.
This is the code for custom view in basic pack i used.
hereMap.get(new Map.InfoBubbleAdapter() {
@Override
public View getInfoBubbleContents(MapMarker mapMarker2) {
return null;
}
@Override
public View getInfoBubble(MapMarker mapMarker2) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
TextView infoWindowText = view.findViewById(R.id.infoMessage);
infoWindowText.setText(mapMarker2.getTitle());
return view;
}
});
and this is the code that i was using on click of marker
@Override
public boolean onMapObjectsSelected(List<ViewObject> objects) {
for (ViewObject object : objects) {
if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
MapMarker mapMarker = (MapMarker) object;
System.out.println("Title is................." + mapMarker.getTitle());
if (!mapMarker.isInfoBubbleVisible()) {
mapMarker.getInfoBubbleContents();
} else {
mapMarker.hideInfoBubble();
}
return true;
}
}
How can i show the custom info bubble when user click on the marker?
android here-api
android here-api
edited yesterday
Kling Klang
32.1k156287
32.1k156287
asked yesterday
Ravi Parmar
84110
84110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You should use sticky map overlays instead:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html
Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-
The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You should use sticky map overlays instead:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html
Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-
The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
add a comment |
up vote
0
down vote
You should use sticky map overlays instead:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html
Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-
The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
add a comment |
up vote
0
down vote
up vote
0
down vote
You should use sticky map overlays instead:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html
Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-
The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.
You should use sticky map overlays instead:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html
Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-
The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.
answered yesterday
Marco
1,6171018
1,6171018
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
add a comment |
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
– Marco
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
– Ravi Parmar
yesterday
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409090%2fhere-map-premium-plan-map-infobubbleadapter-hideinfobubble-getinfobubblecont%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown