From 31006fbc2570a3bf1f013190750b01f56a67c7b1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 29 Mar 2018 15:23:15 +0900 Subject: #1253 --- src/server/web/app/desktop/views/components/post-detail.vue | 4 ++-- src/server/web/app/desktop/views/components/post-form.vue | 3 +-- src/server/web/app/desktop/views/components/posts.post.vue | 4 ++-- src/server/web/app/mobile/views/components/post-detail.vue | 4 ++-- src/server/web/app/mobile/views/components/post-form.vue | 3 +-- src/server/web/app/mobile/views/components/post.vue | 4 ++-- src/server/web/docs/api/entities/post.yaml | 11 +++-------- 7 files changed, 13 insertions(+), 20 deletions(-) (limited to 'src/server/web') diff --git a/src/server/web/app/desktop/views/components/post-detail.vue b/src/server/web/app/desktop/views/components/post-detail.vue index 7783ec62c7..5c7a7dfdbe 100644 --- a/src/server/web/app/desktop/views/components/post-detail.vue +++ b/src/server/web/app/desktop/views/components/post-detail.vue @@ -47,7 +47,7 @@
{{ tag }}
- %fa:map-marker-alt% 位置情報 + %fa:map-marker-alt% 位置情報
@@ -157,7 +157,7 @@ export default Vue.extend({ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true; if (shouldShowMap) { (this as any).os.getGoogleMaps().then(maps => { - const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude); + const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]); const map = new maps.Map(this.$refs.map, { center: uluru, zoom: 15 diff --git a/src/server/web/app/desktop/views/components/post-form.vue b/src/server/web/app/desktop/views/components/post-form.vue index 11028ceb52..1c83a38b64 100644 --- a/src/server/web/app/desktop/views/components/post-form.vue +++ b/src/server/web/app/desktop/views/components/post-form.vue @@ -224,8 +224,7 @@ export default Vue.extend({ repostId: this.repost ? this.repost.id : undefined, poll: this.poll ? (this.$refs.poll as any).get() : undefined, geo: this.geo ? { - latitude: this.geo.latitude, - longitude: this.geo.longitude, + coordinates: [this.geo.longitude, this.geo.latitude], altitude: this.geo.altitude, accuracy: this.geo.accuracy, altitudeAccuracy: this.geo.altitudeAccuracy, diff --git a/src/server/web/app/desktop/views/components/posts.post.vue b/src/server/web/app/desktop/views/components/posts.post.vue index c70e019115..37c6e63043 100644 --- a/src/server/web/app/desktop/views/components/posts.post.vue +++ b/src/server/web/app/desktop/views/components/posts.post.vue @@ -48,7 +48,7 @@
{{ tag }}
- %fa:map-marker-alt% 位置情報 + %fa:map-marker-alt% 位置情報
@@ -169,7 +169,7 @@ export default Vue.extend({ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true; if (shouldShowMap) { (this as any).os.getGoogleMaps().then(maps => { - const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude); + const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]); const map = new maps.Map(this.$refs.map, { center: uluru, zoom: 15 diff --git a/src/server/web/app/mobile/views/components/post-detail.vue b/src/server/web/app/mobile/views/components/post-detail.vue index 29993c79ed..f0af1a61aa 100644 --- a/src/server/web/app/mobile/views/components/post-detail.vue +++ b/src/server/web/app/mobile/views/components/post-detail.vue @@ -47,7 +47,7 @@
- %fa:map-marker-alt% 位置情報 + %fa:map-marker-alt% 位置情報
@@ -154,7 +154,7 @@ export default Vue.extend({ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true; if (shouldShowMap) { (this as any).os.getGoogleMaps().then(maps => { - const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude); + const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]); const map = new maps.Map(this.$refs.map, { center: uluru, zoom: 15 diff --git a/src/server/web/app/mobile/views/components/post-form.vue b/src/server/web/app/mobile/views/components/post-form.vue index 929dc5933b..5b78a25710 100644 --- a/src/server/web/app/mobile/views/components/post-form.vue +++ b/src/server/web/app/mobile/views/components/post-form.vue @@ -118,8 +118,7 @@ export default Vue.extend({ replyId: this.reply ? this.reply.id : undefined, poll: this.poll ? (this.$refs.poll as any).get() : undefined, geo: this.geo ? { - latitude: this.geo.latitude, - longitude: this.geo.longitude, + coordinates: [this.geo.longitude, this.geo.latitude], altitude: this.geo.altitude, accuracy: this.geo.accuracy, altitudeAccuracy: this.geo.altitudeAccuracy, diff --git a/src/server/web/app/mobile/views/components/post.vue b/src/server/web/app/mobile/views/components/post.vue index 66c595f4e9..a01eb7669e 100644 --- a/src/server/web/app/mobile/views/components/post.vue +++ b/src/server/web/app/mobile/views/components/post.vue @@ -48,7 +48,7 @@ {{ tag }}
- %fa:map-marker-alt% 位置情報 + %fa:map-marker-alt% 位置情報
via {{ p.app.name }}
@@ -147,7 +147,7 @@ export default Vue.extend({ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true; if (shouldShowMap) { (this as any).os.getGoogleMaps().then(maps => { - const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude); + const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]); const map = new maps.Map(this.$refs.map, { center: uluru, zoom: 15 diff --git a/src/server/web/docs/api/entities/post.yaml b/src/server/web/docs/api/entities/post.yaml index 71b6a64123..74d7973e38 100644 --- a/src/server/web/docs/api/entities/post.yaml +++ b/src/server/web/docs/api/entities/post.yaml @@ -136,16 +136,11 @@ props: en: "Geo location" defName: "geo" def: - - name: "latitude" - type: "number" - optional: false - desc: - ja: "緯度。-90〜90で表す。" - - name: "longitude" - type: "number" + - name: "coordinates" + type: "number[]" optional: false desc: - ja: "経度。-180〜180で表す。" + ja: "座標。最初に経度:-180〜180で表す。最後に緯度:-90〜90で表す。" - name: "altitude" type: "number" optional: false -- cgit v1.2.3-freya