(index, sprite, displayHeight)
| 801 | } |
| 802 | |
| 803 | function getGoogleSprite (index, sprite, displayHeight) { |
| 804 | displayHeight = Math.max(displayHeight, 3) |
| 805 | var scale = displayHeight / sprite.iconHeight |
| 806 | // Crop icon just a tiny bit to avoid bleedover from neighbor |
| 807 | var scaledIconSize = new google.maps.Size(scale * sprite.iconWidth - 1, scale * sprite.iconHeight - 1) |
| 808 | var scaledIconOffset = new google.maps.Point( |
| 809 | (index % sprite.columns) * sprite.iconWidth * scale + 0.5, |
| 810 | Math.floor(index / sprite.columns) * sprite.iconHeight * scale + 0.5) |
| 811 | var scaledSpriteSize = new google.maps.Size(scale * sprite.spriteWidth, scale * sprite.spriteHeight) |
| 812 | var scaledIconCenterOffset = new google.maps.Point(scale * sprite.iconWidth / 2, scale * sprite.iconHeight / 2) |
| 813 | |
| 814 | return { |
| 815 | url: sprite.filename, |
| 816 | size: scaledIconSize, |
| 817 | scaledSize: scaledSpriteSize, |
| 818 | origin: scaledIconOffset, |
| 819 | anchor: scaledIconCenterOffset |
| 820 | } |
| 821 | } |
| 822 | |
| 823 | function setupPokemonMarker (item, map, isBounceDisabled) { |
| 824 | // Scale icon size up with the map exponentially |
no outgoing calls
no test coverage detected