-
Notifications
You must be signed in to change notification settings - Fork 3
/
script.js
28 lines (23 loc) · 1.05 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var htmlElement = 'mapid';
var options = {
filter : {
pokemonIds: null, sightingsSince: 1500000000, predictionsUntil: 33333333
},
apiEndpoint: 'https://predictemall.online',
websocketEndpoint: 'https://predictemall.online',
tileLayer: 'https://api.mapbox.com/styles/v1/poulzinho/ciu2fc21400k32iqi2gkb7h7g/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoicG91bHppbmhvIiwiYSI6ImNpdTJmMmlwMTAwMHAyeW55NmVpbXpoY3oifQ._S-9Yx6OXlnMMq_MgsodlA',
tileLayerOptions: {
attribution: '' +
'JS16 <a href="https://github.com/PokemonGoers/PokeMap-1">PokeMap</a>, ' +
'Mapping platform © <a href="http://mapbox.com">Mapbox</a> ' +
'Pokemon Images © <a href="http://pokemondb.net/">Pokémon Database</a>',
maxZoom: 18
}
};
var pokemap = new PokeMap(htmlElement, options);
pokemap.on('move', function (event) {
console.log(event.coordinates.latitude + ' ' + event.coordinates.longitude + ' ' + event.zoomLevel);
});
pokemap.on('click', function (data) {
console.log('clicked object - ' + data);
});