Merge pull request #2310 from jellyfin/nielsvanvelzen-osm

Use OpenStreetMap instead of Google Maps
This commit is contained in:
Bill Thornton 2021-01-05 12:06:05 -05:00 committed by GitHub
commit 331295e62e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -697,12 +697,12 @@ function reloadFromItem(instance, page, params, item, user) {
const itemBirthLocation = page.querySelector('#itemBirthLocation'); const itemBirthLocation = page.querySelector('#itemBirthLocation');
if (item.Type == 'Person' && item.ProductionLocations && item.ProductionLocations.length) { if (item.Type == 'Person' && item.ProductionLocations && item.ProductionLocations.length) {
let gmap = item.ProductionLocations[0]; let location = item.ProductionLocations[0];
if (!layoutManager.tv && appHost.supports('externallinks')) { if (!layoutManager.tv && appHost.supports('externallinks')) {
gmap = `<a is="emby-linkbutton" class="button-link textlink" target="_blank" href="https://maps.google.com/maps?q=${gmap}">${gmap}</a>`; location = `<a is="emby-linkbutton" class="button-link textlink" target="_blank" href="https://www.openstreetmap.org/search?query=${encodeURIComponent(location)}">${location}</a>`;
} }
itemBirthLocation.classList.remove('hide'); itemBirthLocation.classList.remove('hide');
itemBirthLocation.innerHTML = globalize.translate('BirthPlaceValue', gmap); itemBirthLocation.innerHTML = globalize.translate('BirthPlaceValue', location);
} else { } else {
itemBirthLocation.classList.add('hide'); itemBirthLocation.classList.add('hide');
} }