flask-extensions / flask-extensions/Flask-GoogleMaps
Infobox hover and persist on click
- Dominant language
- Python
- Stars
- 655
- Forks
- 193
- PR merge metrics
- No merged PRs in 30d
Description
Add option to show infobox on hover and persist on click.
Example
```
if (item["infobox"]) {
(function(_infobox, _map, _marker){
_marker.infoWindow = new google.maps.InfoWindow({
content: _infobox
});
_marker.addListener('click', function() {
_marker.infoWindow.open(_map, _marker);
_marker["persist"] = true;
});
google.maps.event.addListener(_marker.infoWindow,'closeclick',function(){
_marker["persist"] = null;
});
_marker.addListener('mouseover', function() {
_marker.infoWindow.open(_map, _marker);
});
_marker.addListener('mouseout', function() {
if (!_marker["persist"]) {
_marker.infoWindow.close();
}
});
})(item["infobox"], map, marker);
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Use the issue's JavaScript example as the behavioral specification, and first locate the existing marker and infobox generation entry point in the Flask-GoogleMaps extension. Check how marker events and infobox state are currently handled. Done means hover shows the infobox, clicking keeps it open, and the persisted state can be cleared through the close or mouse-out behavior described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, javascript, python
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100