MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / setupPokestopMarker

Function setupPokestopMarker

static/js/map.js:592–615  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

590}
591
592function setupPokestopMarker (item) {
593 var imagename = item['lure_expiration'] ? 'PstopLured' : 'Pstop'
594 var marker = new google.maps.Marker({
595 position: {
596 lat: item['latitude'],
597 lng: item['longitude']
598 },
599 map: map,
600 zIndex: 2,
601 icon: 'static/forts/' + imagename + '.png'
602 })
603
604 if (!marker.rangeCircle && isRangeActive(map)) {
605 marker.rangeCircle = addRangeCircle(marker, map, 'pokestop')
606 }
607
608 marker.infoWindow = new google.maps.InfoWindow({
609 content: pokestopLabel(item['lure_expiration'], item['latitude'], item['longitude']),
610 disableAutoPan: true
611 })
612
613 addListeners(marker)
614 return marker
615}
616
617function getColorByDate (value) {
618 // Changes the color from red to green over 15 mins

Callers 1

processPokestopsFunction · 0.85

Calls 4

isRangeActiveFunction · 0.85
addRangeCircleFunction · 0.85
pokestopLabelFunction · 0.85
addListenersFunction · 0.70

Tested by

no test coverage detected