Skip to content
Snippets Groups Projects
Unverified Commit e1b69c74 authored by Xaver Maierhofer's avatar Xaver Maierhofer
Browse files

[BUGFIX] Remove location object output

parent bf29a01f
No related branches found
No related tags found
No related merge requests found
...@@ -3,13 +3,13 @@ define(['helper'], function (helper) { ...@@ -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>';
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment