chat: guid is no longer available
This commit is contained in:
parent
e4daeaa9cd
commit
6a0e021e30
@ -304,7 +304,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
|
|||||||
case 'PORTAL':
|
case 'PORTAL':
|
||||||
var latlng = [markup[1].latE6/1E6, markup[1].lngE6/1E6];
|
var latlng = [markup[1].latE6/1E6, markup[1].lngE6/1E6];
|
||||||
var perma = '/intel?ll='+latlng[0]+','+latlng[1]+'&z=17&pll='+latlng[0]+','+latlng[1];
|
var perma = '/intel?ll='+latlng[0]+','+latlng[1]+'&z=17&pll='+latlng[0]+','+latlng[1];
|
||||||
var js = 'window.zoomToAndShowPortal(\''+markup[1].guid+'\', ['+latlng[0]+', '+latlng[1]+']);return false';
|
var js = 'window.selectPortalByLatLng('+latlng[0]+', '+latlng[1]+');return false';
|
||||||
|
|
||||||
msg += '<a onclick="'+js+'"'
|
msg += '<a onclick="'+js+'"'
|
||||||
+ ' title="'+markup[1].address+'"'
|
+ ' title="'+markup[1].address+'"'
|
||||||
|
@ -269,6 +269,19 @@ window.zoomToAndShowPortal = function(guid, latlng) {
|
|||||||
urlPortal = guid;
|
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() {
|
String.prototype.capitalize = function() {
|
||||||
return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
|
return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
|
||||||
|
1
main.js
1
main.js
@ -205,6 +205,7 @@ window.DEG2RAD = Math.PI / 180;
|
|||||||
// getters/setters, but if you are careful enough, this works.
|
// getters/setters, but if you are careful enough, this works.
|
||||||
window.refreshTimeout = undefined;
|
window.refreshTimeout = undefined;
|
||||||
window.urlPortal = null;
|
window.urlPortal = null;
|
||||||
|
window.urlPortalLL = null;
|
||||||
window.selectedPortal = null;
|
window.selectedPortal = null;
|
||||||
window.portalRangeIndicator = null;
|
window.portalRangeIndicator = null;
|
||||||
window.portalAccessIndicator = null;
|
window.portalAccessIndicator = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user