[BUGFIX] Remove location object output
This commit is contained in:
parent
bf29a01fdd
commit
e1b69c74ca
@ -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>';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user