Don't show GMaps link for private bookmarks
This commit is contained in:
@@ -140,6 +140,8 @@ export default class PlaceDetails extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get gmapsUrl() {
|
get gmapsUrl() {
|
||||||
|
const id = this.place.gmapsId || this.place.osmId;
|
||||||
|
if (!id) return null;
|
||||||
return `https://www.google.com/maps/search/?api=1&query=${this.name}&query=${this.place.lat},${this.place.lon}`;
|
return `https://www.google.com/maps/search/?api=1&query=${this.name}&query=${this.place.lat},${this.place.lon}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +261,7 @@ export default class PlaceDetails extends Component {
|
|||||||
|
|
||||||
{{#if this.osmUrl}}
|
{{#if this.osmUrl}}
|
||||||
<p class="content-with-icon">
|
<p class="content-with-icon">
|
||||||
<Icon @name="map" @title="OSM ID" />
|
<Icon @name="map" />
|
||||||
<span>
|
<span>
|
||||||
<a href={{this.osmUrl}} target="_blank" rel="noopener noreferrer">
|
<a href={{this.osmUrl}} target="_blank" rel="noopener noreferrer">
|
||||||
OpenStreetMap
|
OpenStreetMap
|
||||||
@@ -268,14 +270,16 @@ export default class PlaceDetails extends Component {
|
|||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<p class="content-with-icon">
|
{{#if this.gmapsUrl}}
|
||||||
<Icon @name="map" @title="OSM ID" />
|
<p class="content-with-icon">
|
||||||
<span>
|
<Icon @name="map" />
|
||||||
<a href={{this.gmapsUrl}} target="_blank" rel="noopener noreferrer">
|
<span>
|
||||||
Google Maps
|
<a href={{this.gmapsUrl}} target="_blank" rel="noopener noreferrer">
|
||||||
</a>
|
Google Maps
|
||||||
</span>
|
</a>
|
||||||
</p>
|
</span>
|
||||||
|
</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user