'
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-lured-marker',
- html: html
- })
- } else {
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-marker',
- html: '
'
- })
- }
- } else if (Store.get(['showRocket']) && !noTeamRocket && item['incident_expiration'] > Date.now()) {
- if (!noLures && item['lure_expiration'] > Date.now()) {
- markerStr = 'Lured_' + item['lure_id']
- }
- 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 (hasRocket){
+ html += '
 + ')
'
if (item['grunt_type'] > 0) {
- html += '
 + ')
'
- } else {
- html += '
'
- }
- if (noRocketTimer === false && Store.get(['showRocketTimer'])) {
- html += '
'
- }
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-rocket-marker',
- html: html
- })
- } else if (Store.get(['showQuests']) && !noQuests && item['quest_reward_type'] !== null && lastMidnight < Number(item['quest_timestamp'])) {
- if (!noLures && item['lure_expiration'] > Date.now()) {
- markerStr = item['lure_id']
+ html += '
 + ')
'
}
+ } else {
+ html += '
 + ')
' +
+ }
+
+ if (hasQuest) {
if (item['quest_reward_type'] === 12) {
- html = '
' +
- '
 + ')
' +
- '
 + ')
' +
- '
'
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-quest-marker',
- html: html
- })
+ html += '
 + ')
'
} else if (item['quest_reward_type'] === 7) {
pokemonid = item['reward_pokemon_id']
formid = item['reward_pokemon_formid']
costumeid = item['reward_pokemon_costumeid']
genderid = item['reward_pokemon_genderid']
shiny = item['reward_pokemon_shiny']
- html = '
' +
- '
 + ')
' +
- '
 + ')
' +
- '
'
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-quest-marker',
- html: html
- })
+ html += '
 + ')
'
} else if (item['quest_reward_type'] === 4) {
- html = '
' +
- '
 + ')
' +
- '
 + ')
' +
- '
 + ')
' +
- '
'
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-quest-marker',
- html: html
- })
+ html += '
 + ')
' +
+ '
 + ')
'
} else if (item['quest_reward_type'] === 3) {
- html = '
' +
- '
 + ')
' +
- '
 + ')
' +
- '
'
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-quest-marker',
- html: html
- })
+ html += '
 + ')
' +
} else if (item['quest_reward_type'] === 2) {
- html = '
' +
- '
 + ')
' +
- '
 + ')
' +
- '
'
- stopMarker = L.divIcon({
- iconSize: [31, 31],
- iconAnchor: [25, 45],
- popupAnchor: [0, -35],
- className: 'stop-quest-marker',
- html: html
- })
+ html += '
 + ')
'
+ }
+ }
+
+ html += "
"
+
+ if (hasRocket){
+ if (noRocketTimer === false && Store.get(['showRocketTimer'])) {
+ html += '
'
}
- } else if (Store.get(['showLures']) && !noLures && item['lure_expiration'] > Date.now()) {
- html = '