Revert 39468944
and fix osmlab#91 without loosing the editor choice
This commit is contained in:
parent
37baed28b1
commit
be088602fb
1 changed files with 11 additions and 2 deletions
|
@ -61,13 +61,22 @@ function remoteEditHandler(bbox, select) {
|
||||||
function updatelinks(loc, zoom, layers, object) {
|
function updatelinks(loc, zoom, layers, object) {
|
||||||
$(".geolink").each(function(index, link) {
|
$(".geolink").each(function(index, link) {
|
||||||
var href = link.href.split(/[?#]/)[0],
|
var href = link.href.split(/[?#]/)[0],
|
||||||
|
args = querystring.parse(link.search.substring(1)),
|
||||||
editlink = $(link).hasClass("editlink");
|
editlink = $(link).hasClass("editlink");
|
||||||
|
|
||||||
if (object && editlink) {
|
if (object && editlink) {
|
||||||
href += '?' + object.type + '=' + object.id;
|
delete args['node'];
|
||||||
|
delete args['way'];
|
||||||
|
delete args['relation'];
|
||||||
|
delete args['changeset'];
|
||||||
|
|
||||||
|
args[object.type] = object.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
var args = {
|
var query = querystring.stringify(args);
|
||||||
|
if (query) href += '?' + query;
|
||||||
|
|
||||||
|
args = {
|
||||||
lat: loc.lat,
|
lat: loc.lat,
|
||||||
lon: loc.lon || loc.lng,
|
lon: loc.lon || loc.lng,
|
||||||
zoom: zoom
|
zoom: zoom
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue