Add support for 'link' component - button to get hard link to current view
This commit is contained in:
parent
5a0983d867
commit
b66008c262
5 changed files with 93 additions and 0 deletions
|
|
@ -829,6 +829,14 @@ DynMap.prototype = {
|
|||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
getLink: function() {
|
||||
var me = this;
|
||||
var url = window.location.pathname;
|
||||
var center = me.maptype.getProjection().fromLatLngToLocation(me.map.getCenter(), 64);
|
||||
url = url + "?worldname=" + me.world.name + "&mapname=" + me.maptype.options.name + "&zoom=" + me.map.getZoom() + "&x=" + center.x + "&y=" +
|
||||
center.y + "&z=" + center.z;
|
||||
return url;
|
||||
}
|
||||
// TODO: Enable hash-links.
|
||||
/* updateLink: function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue