Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map updates #4699

Merged
merged 10 commits into from
Aug 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 6 additions & 28 deletions map-chat/javascript/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,6 @@ function initialize() {
zoomControl: false, // Set to true if using zoomControlOptions below, or false to remove all zoom controls.
mapTypeId: google.maps.MapTypeId.ROADMAP, // Set the type of Map
scrollwheel: true, // Enable Mouse Scroll zooming
styles: [
{
"featureType": "landscape",
"stylers": [{ "hue": "#FFBB00" }, { "saturation": 43.400000000000006 }, { "lightness": 37.599999999999994 }, { "gamma": 1 }]
},
{
"featureType": "road.highway",
"stylers": [{ "hue": "#FFC200" }, { "saturation": -61.8 }, { "lightness": 45.599999999999994 }, { "gamma": 1 }]
},
{
"featureType": "road.arterial",
"stylers": [{ "hue": "#FF0300" }, { "saturation": -100 }, { "lightness": 51.19999999999999 }, { "gamma": 1 }]
},
{
"featureType": "road.local",
"stylers": [{ "hue": "#FF0300" }, { "saturation": -100 }, { "lightness": 52 }, { "gamma": 1 }]
},
{
"featureType": "water",
"stylers": [{ "hue": "#0078FF" }, { "saturation": -13.200000000000003 }, { "lightness": 2.4000000000000057 }, { "gamma": 1 }]
},
{
"featureType": "poi",
"stylers": [{ "hue": "#00FF6A" }, { "saturation": -1.0989010989011234 }, { "lightness": 11.200000000000017 }, { "gamma": 1 }]
}
],
// All of the below are set to true by default, so simply remove if set to true:
panControl: false, // Set to false to disable
mapTypeControl: false, // Disable Map/Satellite switch
Expand Down Expand Up @@ -251,8 +225,12 @@ function displayMessageOnMap(msg, olat, olong, sessid, icostr, expir, pokenick)
var newPosition = new google.maps.LatLng(olat, olong);
var msgSessionId = sessid;
var expiration = expir;
var thetime = "155564565475"
var pName = pokenick/* + " disappears in " + timeUntil(thetime,expiration)*/;
var pName = '';
if(typeof pokenick === 'undefined'){
var pName = "<i>just appeared! </i></b><br>lat: " + olat + " / long: " + olong;
} else {
var pName = "<b>" + pokenick + "</b><i>just appeared! </i></b><br>lat: " + olat + " / long: " + olong;
}
// console.log(pName);
// @ro: just checking the output
//console.log(olat);
Expand Down
2 changes: 2 additions & 0 deletions pokemongo_bot/cell_workers/catch_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from utils import fort_details, distance
from pokemongo_bot.base_dir import _base_dir
from pokemongo_bot.constants import Constants
from pokemongo_bot.inventory import Pokemons, Pokemon, Attack


class CatchPokemon(BaseTask):
Expand Down Expand Up @@ -73,6 +74,7 @@ def get_visible_pokemon(self):
'latitude': pokemon['latitude'],
'longitude': pokemon['longitude'],
'expiration_timestamp_ms': pokemon['expiration_timestamp_ms'],
'pokemon_name': Pokemons.name_for(pokemon['pokemon_id']),
}
)

Expand Down
3 changes: 1 addition & 2 deletions pokemongo_bot/event_handlers/social_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def handle_event(self, event, sender, level, formatted_msg, data):
#geo_hash = Geohash.encode(data['latitude'], data['longitude'], precision=4)
#self.mqttc.publish("pgomapgeo/"+geo_hash+"/"+str(data['pokemon_id']), str(data['latitude'])+","+str(data['longitude'])+","+str(data['encounter_id'])+","+str(data['pokemon_id'])+","+str(data['expiration_timestamp_ms'])+","+str(data['pokemon_name']))
#{u'pokemon_id': 13, u'expiration_timestamp_ms': 1472017713812L, u'longitude': 4.897220519201337, u'latitude': 52.33937206069979, u'spawn_point_id': u'47c60a241ad', u'encounter_id': 13653280540966083917L}
self.mqttc.publish("pgomapcatch/all/catchable/"+str(data['pokemon_id']), str(data['latitude'])+","+str(data['longitude'])+","+str(data['encounter_id'])+","+str(data['pokemon_id'])+","+str(data['expiration_timestamp_ms']))
print data
self.mqttc.publish("pgomapcatch/all/catchable/"+str(data['pokemon_id']), str(data['latitude'])+","+str(data['longitude'])+","+str(data['encounter_id'])+","+str(data['pokemon_id'])+","+str(data['expiration_timestamp_ms'])+","+str(data['pokemon_name']))
json_data = json.dumps(data)
self.mqttc.publish("pgo/all/catchable/"+str(data['pokemon_id']), json_data)

Expand Down