(marker, item, skipNotification)
| 531 | } |
| 532 | |
| 533 | function customizePokemonMarker (marker, item, skipNotification) { |
| 534 | marker.addListener('click', function () { |
| 535 | this.setAnimation(null) |
| 536 | this.animationDisabled = true |
| 537 | }) |
| 538 | |
| 539 | if (!marker.rangeCircle && isRangeActive(map)) { |
| 540 | marker.rangeCircle = addRangeCircle(marker, map, 'pokemon') |
| 541 | } |
| 542 | |
| 543 | marker.infoWindow = new google.maps.InfoWindow({ |
| 544 | content: pokemonLabel(item['pokemon_name'], item['pokemon_rarity'], item['pokemon_types'], item['disappear_time'], item['pokemon_id'], item['latitude'], item['longitude'], item['encounter_id']), |
| 545 | disableAutoPan: true |
| 546 | }) |
| 547 | |
| 548 | if (notifiedPokemon.indexOf(item['pokemon_id']) > -1 || notifiedRarity.indexOf(item['pokemon_rarity']) > -1) { |
| 549 | if (!skipNotification) { |
| 550 | if (Store.get('playSound')) { |
| 551 | audio.play() |
| 552 | } |
| 553 | sendNotification('A wild ' + item['pokemon_name'] + ' appeared!', 'Click to load map', 'static/icons/' + item['pokemon_id'] + '.png', item['latitude'], item['longitude']) |
| 554 | } |
| 555 | if (marker.animationDisabled !== true) { |
| 556 | marker.setAnimation(google.maps.Animation.BOUNCE) |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | addListeners(marker) |
| 561 | } |
| 562 | |
| 563 | function setupGymMarker (item) { |
| 564 | var marker = new google.maps.Marker({ |
no test coverage detected