chat: guid is no longer available

This commit is contained in:
fkloft
2015-01-16 20:41:31 +01:00
parent e4daeaa9cd
commit 6a0e021e30
3 changed files with 15 additions and 1 deletions

View File

@ -269,6 +269,19 @@ window.zoomToAndShowPortal = function(guid, latlng) {
urlPortal = guid;
}
window.selectPortalByLatLng = function(lat, lng) {
for(var guid in window.portals) {
var latlng = window.portals[guid].getLatLng();
if(latlng.lat == lat && latlng.lng == lng) {
renderPortalDetails(guid);
return;
}
}
// not currently visible
urlPortalLL = [lat, lng];
map.setView(urlPortalLL, 17);
};
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();