(i, item)
| 907 | } |
| 908 | |
| 909 | function processPokestops (i, item) { |
| 910 | if (!Store.get('showPokestops')) { |
| 911 | return false |
| 912 | } |
| 913 | |
| 914 | if (Store.get('showLuredPokestopsOnly') && !item['lure_expiration']) { |
| 915 | if (mapData.pokestops[item['pokestop_id']] && mapData.pokestops[item['pokestop_id']].marker) { |
| 916 | if (mapData.pokestops[item['pokestop_id']].marker.rangeCircle) { |
| 917 | mapData.pokestops[item['pokestop_id']].marker.rangeCircle.setMap(null) |
| 918 | } |
| 919 | mapData.pokestops[item['pokestop_id']].marker.setMap(null) |
| 920 | delete mapData.pokestops[item['pokestop_id']] |
| 921 | } |
| 922 | return true |
| 923 | } |
| 924 | |
| 925 | if (!mapData.pokestops[item['pokestop_id']]) { // add marker to map and item to dict |
| 926 | // add marker to map and item to dict |
| 927 | if (item.marker && item.marker.rangeCircle) { |
| 928 | item.marker.rangeCircle.setMap(null) |
| 929 | } |
| 930 | if (item.marker) { |
| 931 | item.marker.setMap(null) |
| 932 | } |
| 933 | item.marker = setupPokestopMarker(item) |
| 934 | mapData.pokestops[item['pokestop_id']] = item |
| 935 | } else { |
| 936 | var item2 = mapData.pokestops[item['pokestop_id']] |
| 937 | if (!!item['lure_expiration'] !== !!item2['lure_expiration']) { |
| 938 | if (item2.marker && item2.marker.rangeCircle) { |
| 939 | item2.marker.rangeCircle.setMap(null) |
| 940 | } |
| 941 | item2.marker.setMap(null) |
| 942 | item.marker = setupPokestopMarker(item) |
| 943 | mapData.pokestops[item['pokestop_id']] = item |
| 944 | } |
| 945 | } |
| 946 | } |
| 947 | |
| 948 | function processGyms (i, item) { |
| 949 | if (!Store.get('showGyms')) { |
nothing calls this directly
no test coverage detected