integrazione api mappa google
This commit is contained in:
@@ -13,10 +13,14 @@ export class DetailComponent implements OnInit {
|
||||
|
||||
test = {
|
||||
name: 'SPAI',
|
||||
cordinates: "46.15187077044123, 8.799829438699243",
|
||||
cordinates: '46.15187077044123,8.799829438699243',
|
||||
lat: 46.15187077044123,
|
||||
lng: 8.799829438699243,
|
||||
description: "Lorem ipsum"
|
||||
}
|
||||
|
||||
embed = `https://www.google.com/maps/embed/v1/place?key=AIzaSyBJL4FWmG032BG6KXxTb4faxpO_ccyaP3o&q=${this.test.lat},${this.test.lng}`
|
||||
|
||||
cord = {
|
||||
lat: 0,
|
||||
lng: 0
|
||||
@@ -27,6 +31,7 @@ export class DetailComponent implements OnInit {
|
||||
displayedDistance = 0;
|
||||
|
||||
getLocation() {
|
||||
console.log(this.embed)
|
||||
console.log("get location");
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition((position) => {
|
||||
|
||||
Reference in New Issue
Block a user