Project

General

Profile

Actions

Feature #1219

closed

InfoWindow on marker and iconMarker mouse click

Added by Antonio Mancina about 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
04/03/2012
Due date:
% Done:

0%

Estimated time:

Description

It would be useful to have the very same google map feature when the user clicks on markers. Google shows a balloon with some info within it. As of now, this seems to be not possible, since the developer may associate a callback to the generic user click on the map, but this does not work when the user clicks on markers or iconMarkers.

In the attached patch, if the user adds a WString parameter as the last parameter in the addMarker and addIconMarker calls, it automatically associates an event listener to the marker and displays a balloon with the handed string when the user clicks on it.


Files

Actions #1

Updated by Antonio Mancina about 12 years ago

The attached patch works against 3.2.1 (also, an unnecessary logging row has been removed)

Actions #2

Updated by Koen Deforche about 12 years ago

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin
  • Target version set to 3.2.2
Actions #3

Updated by Pieter Libin almost 12 years ago

  • Status changed from InProgress to Feedback
  • Assignee changed from Pieter Libin to Koen Deforche

Hey Koen,

I was thinking to solve this issue by implementing a more generic approach.

We could keep a list of added Markers and IconMarkers in the WGoogleMap class,

and a method to remove an (Icon)Marker.

The structs representing these markers can look like this:

struct Marker {

std::string id;

Coordinate c;

}

struct IconMarker : public Marker {

std::string icon;

}

To react on marker clicking, we could add 2 signals:

Signal markerClicked()

Signal iconMarkerClicked()

This infrastructure will allow users to react to clicks on the marker directly,

and for example open a InfoWindow when such events occur.

Pieter

Actions #4

Updated by Koen Deforche almost 12 years ago

  • Status changed from Feedback to InProgress
  • Target version changed from 3.2.2 to 3.2.3

Pieter,

This approach is fine.

Regards,

koen

Actions #5

Updated by Koen Deforche over 11 years ago

  • Status changed from InProgress to Closed
Actions

Also available in: Atom PDF