(item, map, isBounceDisabled)
| 821 | } |
| 822 | |
| 823 | function setupPokemonMarker (item, map, isBounceDisabled) { |
| 824 | // Scale icon size up with the map exponentially |
| 825 | var iconSize = 2 + (map.getZoom() - 3) * (map.getZoom() - 3) * 0.2 + Store.get('iconSizeModifier') |
| 826 | var pokemonIndex = item['pokemon_id'] - 1 |
| 827 | var sprite = pokemonSprites[Store.get('pokemonIcons')] || pokemonSprites['highres'] |
| 828 | var icon = getGoogleSprite(pokemonIndex, sprite, iconSize) |
| 829 | |
| 830 | var animationDisabled = false |
| 831 | if (isBounceDisabled === true) { |
| 832 | animationDisabled = true |
| 833 | } |
| 834 | |
| 835 | var marker = new google.maps.Marker({ |
| 836 | position: { |
| 837 | lat: item['latitude'], |
| 838 | lng: item['longitude'] |
| 839 | }, |
| 840 | zIndex: 9999, |
| 841 | map: map, |
| 842 | icon: icon, |
| 843 | animationDisabled: animationDisabled |
| 844 | }) |
| 845 | |
| 846 | return marker |
| 847 | } |
| 848 | |
| 849 | function isTouchDevice () { |
| 850 | // Should cover most browsers |
no test coverage detected