diff --git a/code/boot.js b/code/boot.js index 29b052cc..7d195352 100644 --- a/code/boot.js +++ b/code/boot.js @@ -396,6 +396,11 @@ function boot() { window.setupBackButton(); // read here ONCE, so the URL is only evaluated one time after the // necessary data has been loaded. + urlPortalLL = getURLParam('pll'); + if(urlPortalLL) { + urlPortalLL = urlPortalLL.split(","); + urlPortalLL = [parseFloat(urlPortalLL[0]) || 0.0, parseFloat(urlPortalLL[1]) || 0.0]; + } urlPortal = getURLParam('pguid'); // load only once diff --git a/code/chat.js b/code/chat.js index df42dd2a..a2b78797 100644 --- a/code/chat.js +++ b/code/chat.js @@ -301,7 +301,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel) { case 'PORTAL': var latlng = [markup[1].latE6/1E6, markup[1].lngE6/1E6]; - var perma = '/intel?latE6='+markup[1].latE6+'&lngE6='+markup[1].lngE6+'&z=17&pguid='+markup[1].guid; + 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'; msg += '