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

Function setupGymMarker

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

Source from the content-addressed store, hash-verified

561}
562
563function setupGymMarker (item) {
564 var marker = new google.maps.Marker({
565 position: {
566 lat: item['latitude'],
567 lng: item['longitude']
568 },
569 map: map,
570 icon: 'static/forts/' + gymTypes[item['team_id']] + '.png'
571 })
572
573 if (!marker.rangeCircle && isRangeActive(map)) {
574 marker.rangeCircle = addRangeCircle(marker, map, 'gym', item['team_id'])
575 }
576
577 marker.infoWindow = new google.maps.InfoWindow({
578 content: gymLabel(gymTypes[item['team_id']], item['team_id'], item['gym_points'], item['latitude'], item['longitude'], item['last_scanned'], item['name'], item['pokemon']),
579 disableAutoPan: true
580 })
581
582 addListeners(marker)
583 return marker
584}
585
586function updateGymMarker (item, marker) {
587 marker.setIcon('static/forts/' + gymTypes[item['team_id']] + '.png')

Callers 1

processGymsFunction · 0.85

Calls 4

isRangeActiveFunction · 0.85
addRangeCircleFunction · 0.85
gymLabelFunction · 0.85
addListenersFunction · 0.70

Tested by

no test coverage detected