diff --git a/src/App.vue b/src/App.vue index a0994db..3bc4fb7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,13 +2,15 @@
- -

Parent : {{ position.lat }}, {{ position.lngĀ }}

+ +

Parent : {{ lat }}, {{ lngĀ }}

Alt : {{ alt }}

+
+ + + diff --git a/src/components/GmaltSearch.vue b/src/components/GmaltSearch.vue index 8ab8c1a..26b3a71 100644 --- a/src/components/GmaltSearch.vue +++ b/src/components/GmaltSearch.vue @@ -2,12 +2,12 @@
- +
- +
@@ -22,12 +22,13 @@ props: ['lat', 'lng'], methods: { search () { - this.$emit('search', this.position) + this.$emit('search', this.fieldLat, this.fieldLng) } }, data () { return { - position: {lat: this.lat, lng: this.lng} + fieldLat: this.lat, + fieldLng: this.lng } } } diff --git a/src/services/AltService.js b/src/services/AltService.js index 5cd73fb..02b913d 100644 --- a/src/services/AltService.js +++ b/src/services/AltService.js @@ -3,8 +3,8 @@ import * as resolveUrl from 'resolve-url' const apiUrl = resolveUrl(process.env.API_URL, '/altitude') export default { - get (position) { - return fetch(apiUrl + '?lat=' + position.lat + '&lng=' + position.lng) + get (lat, lng) { + return fetch(apiUrl + '?lat=' + lat + '&lng=' + lng) .then(function (response) { if (response.status >= 200 && response.status < 300) { return response