Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions client/src/views/LatestExchange.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<v-icon dark color="primary" slot="activator">info</v-icon>
<span>Consultado el {{ props.item.queryDate | fd("YYYY/MM/DD [a las] HH:mm") }}</span>
</v-tooltip>
<a :href="props.item.gmapsLink" v-if="props.item.gmapsLink" target="_blank">
<a :href="props.item.osmLink" v-if="props.item.osmLink" target="_blank">
<v-icon>map</v-icon>
</a>
</td>
Expand Down Expand Up @@ -98,10 +98,14 @@
this.loading = true;
ExchangeAPI.getTodayExchange(this.currentCurrency).then(data => {
for (let row of data) {
if (row.branchLatitude)
if (row.branchLatitude) {
row['gmapsLink'] = `https://www.google.com/maps/search/?api=1&query=${row.branchLatitude},${row.branchLongitude}`;
else
row['osmLink'] = `https://www.openstreetmap.org/?mlat=${row.branchLatitude}&mlon=${row.branchLongitude}&zoom=17`;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No hay alguna forma de conseguir un link que funcione para ambos? digo para teléfonos móviles donde clickando nos lleva a gmps, si agregamos ambos links?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creo que algo más genérico seria usar el esquema geo, pero creo que escapa al propósito de este cambio, que era reemplazar Google por OSM. Otro problema que habria con el esquema geo, es que por alguna razón parece no soportarse bien en los navegadores de escritorio

}
else {
row['gmapsLink'] = null;
row['osmLink'] = null;
}
}
this.data = data;
this.loading = false;
Expand Down