Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
TokyoCityMapCard を largemap.vue から分離し単独表示用の設定を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
macropygia committed Mar 26, 2020
1 parent e2e7640 commit 7febdd7
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 27 deletions.
33 changes: 33 additions & 0 deletions components/cards/TokyoCityMapCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<template>
<v-col cols="12" md="12" class="DataCard">
<map-card
:title="''"
:caption="$t('※7:30〜8:30の平均値')"
:title-id="'tokyo-city-heatmap'"
:chart-id="'tokyo-city-chart'"
:map-id="'tokyo-city-map'"
:initial-bounds="[
[139.695239, 35.676437],
[139.773774, 35.694493]
]"
:map-height="640"
:map-options="{ interactive: true }"
:unit="'人'"
:url="'https://ds.yahoo.co.jp/datapolicy/'"
:source-link-header="$t('※本データは2020年3月31日までの掲載となります')"
:heatmap-legend="[20000, 40000, 60000]"
:link-string="$t('ヤフー・データソリューション')"
:date="''"
/>
</v-col>
</template>

<script>
import MapCard from '@/components/MapCard.vue'
export default {
components: {
MapCard
}
}
</script>
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ const config: Configuration = {
'/cards/shinjuku-visitors',
'/cards/chiyoda-visitors',
'/cards/shinjuku-st-heatmap',
'/cards/tokyo-st-heatmap'
'/cards/tokyo-st-heatmap',
'/cards/tokyo-city-heatmap'
]

const routes: string[] = []
Expand Down
7 changes: 6 additions & 1 deletion pages/cards/_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
<tokyo-st-map-card
v-else-if="this.$route.params.card == 'tokyo-st-heatmap'"
/>
<tokyo-city-map-card
v-else-if="this.$route.params.card == 'tokyo-city-heatmap'"
/>
</div>
</template>

Expand All @@ -71,6 +74,7 @@ import ShinjukuVisitorsCard from '@/components/cards/ShinjukuVisitorsCard.vue'
import ChiyodaVisitorsCard from '@/components/cards/ChiyodaVisitorsCard.vue'
import ShinjukuStMapCard from '@/components/cards/ShinjukuStMapCard.vue'
import TokyoStMapCard from '@/components/cards/TokyoStMapCard.vue'
import TokyoCityMapCard from '@/components/cards/TokyoCityMapCard.vue'
export default {
components: {
Expand All @@ -87,7 +91,8 @@ export default {
ShinjukuVisitorsCard,
ChiyodaVisitorsCard,
ShinjukuStMapCard,
TokyoStMapCard
TokyoStMapCard,
TokyoCityMapCard
},
data() {
let title, updatedAt
Expand Down
28 changes: 3 additions & 25 deletions pages/largemap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,7 @@
{{ headerItem.title }}
</page-header>
<v-row class="DataBlock">
<v-col cols="12" md="12" class="DataCard">
<map-card
:title="''"
:caption="$t('※7:30〜8:30の平均値')"
:title-id="'tokyo-city-title'"
:chart-id="'tokyo-city-chart'"
:map-id="'tokyo-city-map'"
:initial-bounds="[
[139.695239, 35.676437],
[139.773774, 35.694493]
]"
:map-height="640"
:map-options="{ interactive: true }"
:unit="'人'"
:url="'https://ds.yahoo.co.jp/datapolicy/'"
:source-link-header="
$t('※本データは2020年3月31日までの掲載となります')
"
:heatmap-legend="[20000, 40000, 60000]"
:link-string="$t('ヤフー・データソリューション')"
:date="''"
/>
</v-col>
<tokyo-city-map-card />
</v-row>
</div>
</template>
Expand All @@ -37,12 +15,12 @@ import { MetaInfo } from 'vue-meta'
import PageHeader from '@/components/PageHeader.vue'
import Data from '@/data/data.json'
import News from '@/data/news.json'
import MapCard from '@/components/MapCard.vue'
import TokyoCityMapCard from '@/components/cards/TokyoCityMapCard.vue'
export default Vue.extend({
components: {
PageHeader,
MapCard
TokyoCityMapCard
},
data() {
const data = {
Expand Down

0 comments on commit 7febdd7

Please sign in to comment.