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

Function setupPokemonMarker

static/js/map.common.js:823–847  ·  view source on GitHub ↗
(item, map, isBounceDisabled)

Source from the content-addressed store, hash-verified

821}
822
823function 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
849function isTouchDevice () {
850 // Should cover most browsers

Callers 4

processPokemonsFunction · 0.85
redrawPokemonFunction · 0.85
processAppearanceFunction · 0.85
redrawAppearancesFunction · 0.85

Calls 1

getGoogleSpriteFunction · 0.85

Tested by

no test coverage detected