Skip to content

Commit 5e3c3b9

Browse files
ScyntrusSimon
authored and
Simon
committed
Fix bug where lured Pokestops disappear after 10 seconds (Noctem#297)
Previously, the disappear_time was unset for lured pokestops, causing a task to remove it from the map to run after 10 seconds. The changes to example_fullmap.html also handle the case where a lure expires or a new lure is used, forcing the map icon to refresh.
1 parent c9e6809 commit 5e3c3b9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

example.py

+1
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ def get_pokemarkers():
873873
pokeMarkers.append({
874874
'type': 'lured_stop',
875875
'key': stop_key,
876+
'disappear_time': -1,
876877
'icon': 'static/forts/PstopLured.png',
877878
'lat': stop[0],
878879
'lng': stop[1],

templates/example_fullmap.html

+4
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ <h1>Flask Google Maps Full Map Example</h1>
161161
console.log("Warning: object with identical key has different coordinates please report bug", key);
162162
needs_replacing = true;
163163
}
164+
if (markerCache[key].item.type != item["type"] || (item["infobox"] != null && markerCache[key].item["infobox"] != null && item["infobox"] != markerCache[key].item["infobox"])) {
165+
(function(_marker){setTimeout(_marker.setMap(null), 500)})(markerCache[key].marker);
166+
needs_replacing = true;
167+
}
164168
if(!needs_replacing){
165169
continue;
166170
}

0 commit comments

Comments
 (0)