flask-extensions / flask-extensions/Flask-GoogleMaps

Infobox hover and persist on click

Open
#31 0 comments 0 reactions 0 assignees View on GitHub
hacktoberfest ready
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.