[BUGFIX] Remove location object output

This commit is contained in:
Xaver Maierhofer 2017-04-21 00:43:39 +02:00
parent bf29a01fdd
commit e1b69c74ca
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8

View File

@ -3,13 +3,13 @@ define(['helper'], function (helper) {
return function (config, el, router, d) { return function (config, el, router, d) {
var sidebarTitle = document.createElement('h2'); var sidebarTitle = document.createElement('h2');
sidebarTitle.textContent = _.t('location.location') + ': ' + d.toString(); sidebarTitle.textContent = _.t('location.location');
el.appendChild(sidebarTitle); el.appendChild(sidebarTitle);
helper.getJSON(config.reverseGeocodingApi + '?format=json&lat=' + d.lat + '&lon=' + d.lng + '&zoom=18&addressdetails=0&accept-language=' + _.locale()) helper.getJSON(config.reverseGeocodingApi + '?format=json&lat=' + d.lat + '&lon=' + d.lng + '&zoom=18&addressdetails=0&accept-language=' + _.locale())
.then(function (result) { .then(function (result) {
if (result.display_name) { if (result.display_name) {
sidebarTitle.textContent = result.display_name; sidebarTitle.outerHTML += '<p>' + result.display_name + '</p>';
} }
}); });