-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtestMap.js
More file actions
46 lines (40 loc) · 1.23 KB
/
testMap.js
File metadata and controls
46 lines (40 loc) · 1.23 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var PokeMap = require('./js/pokemap');
var map = document.getElementById('map');
var filter =
{
pokemonIds: null,
sightingsSince: 100000,
predictionsUntil: 10
};
var options =
{
tileLayer: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
filter : filter,
apiEndpoint: "http://pokedata.c4e3f8c7.svc.dockerapp.io:65014",
websocketEndpoint: "http://pokedata.c4e3f8c7.svc.dockerapp.io:65024"
};
var poke = new PokeMap(map, options);
//var poke = new PokeMap(map, {latitude: 48.264673, longitude: 11.671434}, {from: -83000, to: 5});
//var coordinates = {latitude: 48, longitude: 11};
//var zoomLevel = 15;
//poke.goTo({coordinates,zoomLevel});
//var pokeTypeInsance = new pokeType();
//
//var pJSON = "[";
//pJSON += "'latitude':2,'longitude':3]";
//
//var p = new pokeTypeInsance.PokePOI("dlk");
//
// poke.on('click', function(poke)
// {
// if(poke instanceof pokeType.PokemonSighting)
// {
// console.log("It is a pokemonSighting with pokemon: " + poke.pokemon.pokemonname);
// }
// else if (poke instanceof pokeType.PokemonPrediction)
// {
// console.log("It is a pokemonPrediction: " + poke.pokemon.pokemonname);
// }
//
// showAdditionalInformation(poke);
// });