Question

I need to display an additional info for a marker when it's clicked. I expected to find a way how to display a popup window (like a tooltip) with a short description on marker click, but failed.
I use MapMarker class for my markers because I need custom icons.
The MapMarker and MapStandardMarker classes do not have the functionality I need.

As I understand, I need something like Android MapView Balloons

Was it helpful?

Solution

I've solved the problem. I use the popup dialog similar to the one implemented in "Meet Me For Dinner" sample application. All necessary info can be found here.

I met the problem with detecting a click on marker. For this I used MapDisplay.getObjectAt () method. But it looks like that method doesn't take into account the marker's anchor point. So, I had to use the following work-around for this:

    final MapObject mapObj = mapDisp.getObjectAt ( new Point (
    clickX + m_markerIconSize.getWidth (),
    clickY + m_markerIconSize.getHeight () )
);
if ( (mapObj != null) && (mapObj instanceof MapMarker) ) {

OTHER TIPS

I worked on Google MID-MAPS, There is no any method to show balloon in MapMarker but you can try with your own method create your own balloon. When user clicks particular position of map you can show your balloon. I never tried this but lets try and let me know also. Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top