Feature #1219
closedInfoWindow on marker and iconMarker mouse click
0%
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
Updated by Antonio Mancina over 12 years ago
The attached patch works against 3.2.1 (also, an unnecessary logging row has been removed)
Updated by Koen Deforche over 12 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
- Target version set to 3.2.2
Updated by Pieter Libin over 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
Updated by Koen Deforche over 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
Updated by Koen Deforche about 12 years ago
- Status changed from InProgress to Closed