fix editmap

This commit is contained in:
Martin Geno 2016-06-24 09:49:15 +02:00
parent 2d6bfc2666
commit 5b46e9a6c9
1 changed files with 3 additions and 2 deletions

View File

@ -60,8 +60,9 @@ function createModel(){
internal.aliases[nodeid].location = {} internal.aliases[nodeid].location = {}
} }
pos = dialogEditNodeMapCurrent.getLatLng() pos = dialogEditNodeMapCurrent.getLatLng()
internal.aliases[nodeid].location.latitude = pos[0] console.log(pos)
internal.aliases[nodeid].location.longitude = pos[1] internal.aliases[nodeid].location.latitude = pos.lat
internal.aliases[nodeid].location.longitude = pos.lng
internal.aliases[nodeid].hostname = dialogEditNodeContent.querySelector('input[name="hostname"]').value internal.aliases[nodeid].hostname = dialogEditNodeContent.querySelector('input[name="hostname"]').value
console.log("save",internal.aliases[nodeid],dialogEditNodeMapCurrent.getLatLng()) console.log("save",internal.aliases[nodeid],dialogEditNodeMapCurrent.getLatLng())
send('POST',internal.config.api+'/aliases/alias/'+nodeid,internal.aliases[nodeid]).then(function(){ send('POST',internal.config.api+'/aliases/alias/'+nodeid,internal.aliases[nodeid]).then(function(){