diff --git a/static/js/map.js b/static/js/map.js index 52e492161..8ae5f55ed 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -2401,173 +2401,44 @@ function getPokestopMarkerIcon(item) { lastMidnight = 0 } var lureStr = '' + if (item['lure_expiration'] > Date.now()) { + lureStr = 'Lured_' + item['lure_id'] + } var stopQuestIcon = 'PstopQuest.png' var pokemonIdStr = '' var formStr = '' var shinyStr = '' - if (Store.get(['showPokestops']) && !Store.get(['showQuests']) && !Store.get(['showLures']) && !Store.get(['showRocket']) && !Store.get(['showAllPokestops'])) { - stopMarker = L.divIcon({ - iconSize: [31, 31], - iconAnchor: [25, 45], - popupAnchor: [0, -35], - className: 'stop-marker', - html: '

'
- if (item['grunt_type'] > 0) {
- html += '
' +
- '

'
+ var hasRocket = item['incident_expiration'] > Date.now();
+ var hasQuest = item['quest_reward_type'] !== null && lastMidnight < Number(item['quest_timestamp']);
+
+ var showRocket = false;
+ var showQuest = false;
+ var showLures = false;
+
+ //TODO also factor in the "no*" stuff.
+ if (Store.get(['showQuests']) || Store.get(['showAllPokestops'])){
+ showQuest = true;
+ }
+ if (Store.get(['showRocket']) || Store.get(['showAllPokestops'])){
+ showRocket = true;
+ }
+ if (Store.get(['showLures']) || Store.get(['showAllPokestops'])){
+ showLures = true;
+ }
+
+ var html = '
'
if (item['grunt_type'] > 0) {
- html += '
'
}
+ } else {
+ html += '
'
+ }
+
+ if (hasQuest) {
if (item['quest_reward_type'] === 12) {
- html = '
' +
- '
'
} else if (item['quest_reward_type'] === 3) {
- html = '
