├── JapanMapCompare.png
├── README.md
├── babel.config.js
├── client
├── babel.config.js
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ └── index.html
├── src
│ ├── App.vue
│ ├── assets
│ │ ├── MapType.json
│ │ ├── PaneType.json
│ │ ├── mierune.png
│ │ ├── sorry.png
│ │ └── trusts_of_gi.png
│ ├── components
│ │ ├── Loading.vue
│ │ ├── MapAdd.vue
│ │ ├── Menu.vue
│ │ └── ZoomLevel.vue
│ ├── main.js
│ ├── plugins
│ │ ├── axios.js
│ │ └── bootstrap-vue.js
│ ├── router.js
│ ├── store.js
│ └── views
│ │ ├── Help.vue
│ │ ├── Pane.vue
│ │ └── View404.vue
└── vue.config.js
├── img
└── JapanMapCompare.png
├── package-lock.json
├── package.json
├── public
├── favicon.ico
└── index.html
├── src
├── App.vue
├── assets
│ ├── MapType.json
│ ├── PaneType.json
│ ├── mierune.png
│ ├── sorry.png
│ └── trusts_of_gi.png
├── components
│ ├── Loading.vue
│ ├── MapAdd.vue
│ ├── Menu.vue
│ └── ZoomLevel.vue
├── main.js
├── plugins
│ ├── axios.js
│ └── bootstrap-vue.js
├── router.js
├── store.js
└── views
│ ├── Help.vue
│ ├── Pane.vue
│ └── View404.vue
└── vue.config.js
/JapanMapCompare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/JapanMapCompare.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JapanMapCompare
2 |
3 | 
4 |
5 |
6 |
7 | Tool
8 | - Vue.js v2.6.10
9 | - Vue-Router v3.0.3
10 | - Vuex v3.0.1
11 | - axios v0.18.1
12 | - Bootstrap-Vue v2.0.0
13 | - Bootstrap v4.3.1
14 | - Leaflet v1.5.1
15 |
16 |
17 |
18 | Environment
19 | - node v11.15.0
20 | - npm v6.9.0
21 |
22 |
23 |
24 | ## Usage
25 |
26 |
27 |
28 | The API key must be set in the 「xxxxx」 part of the file.
29 |
30 | ```
31 | /src/assets/MapType.json
32 | ```
33 |
34 |
35 |
36 | Install package
37 |
38 | ```
39 | npm install
40 | ```
41 |
42 |
43 |
44 | serve
45 |
46 | ```
47 | npm run serve
48 | ```
49 |
50 |
51 |
52 | build
53 |
54 | ```
55 | npm run build
56 | ```
57 |
58 |
59 |
60 |
61 | ---
62 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | [
4 | '@vue/app',
5 | {
6 | useBuiltIns: 'entry',
7 | },
8 | ],
9 | ],
10 | };
11 |
--------------------------------------------------------------------------------
/client/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | [
4 | '@vue/app',
5 | {
6 | useBuiltIns: 'entry',
7 | },
8 | ],
9 | ],
10 | };
11 |
--------------------------------------------------------------------------------
/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "japanmapcompare",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "apple-mapkit-js": "^6.1.0",
12 | "axios-jsonp": "^1.0.2",
13 | "bootstrap-vue": "^2.0.0-rc.19",
14 | "core-js": "^2.6.5",
15 | "leaflet": "^1.5.1",
16 | "leaflet-bing-layer": "^3.3.1",
17 | "leaflet.gridlayer.googlemutant": "^0.8.0",
18 | "leaflet.mapkitmutant": "^0.3.1",
19 | "leaflet.sync": "^0.2.4",
20 | "scriptjs": "^2.5.9",
21 | "vue": "^2.6.10",
22 | "vue-analytics": "^5.17.0",
23 | "vue-router": "^3.0.3",
24 | "vue-spinner": "^1.0.3",
25 | "vuex": "^3.0.1"
26 | },
27 | "devDependencies": {
28 | "@babel/polyfill": "^7.4.4",
29 | "@vue/cli-plugin-babel": "^3.8.0",
30 | "@vue/cli-plugin-eslint": "^3.8.0",
31 | "@vue/cli-service": "^3.8.0",
32 | "axios": "^0.21.2",
33 | "babel-eslint": "^10.0.1",
34 | "bootstrap": "^4.3.1",
35 | "eslint": "^5.16.0",
36 | "eslint-plugin-vue": "^5.0.0",
37 | "mutationobserver-shim": "^0.3.3",
38 | "node-sass": "^7.0.0",
39 | "popper.js": "^1.15.0",
40 | "portal-vue": "^2.1.4",
41 | "sass-loader": "^7.1.0",
42 | "vue-cli-plugin-bootstrap-vue": "^0.4.0",
43 | "vue-template-compiler": "^2.6.10"
44 | },
45 | "eslintConfig": {
46 | "root": true,
47 | "env": {
48 | "node": true
49 | },
50 | "extends": [
51 | "plugin:vue/essential",
52 | "eslint:recommended"
53 | ],
54 | "rules": {},
55 | "parserOptions": {
56 | "parser": "babel-eslint"
57 | }
58 | },
59 | "postcss": {
60 | "plugins": {
61 | "autoprefixer": {}
62 | }
63 | },
64 | "browserslist": [
65 | "> 1%",
66 | "last 2 versions"
67 | ]
68 | }
69 |
--------------------------------------------------------------------------------
/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/client/public/favicon.ico
--------------------------------------------------------------------------------
/client/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | JapanMapCompare
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/client/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
57 |
58 |
77 |
--------------------------------------------------------------------------------
/client/src/assets/MapType.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "value": "tPale",
4 | "text": "地理院地図 淡色",
5 | "tileURL": "https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",
6 | "attribution": "国土地理院 "
7 | },
8 | {
9 | "value": "tOrt",
10 | "text": "地理院地図 オルソ",
11 | "tileURL": "https://cyberjapandata.gsi.go.jp/xyz/seamlessphoto/{z}/{x}/{y}.jpg",
12 | "attribution": "国土地理院 "
13 | },
14 | {
15 | "value": "mieStreets",
16 | "text": "MIERUNE Streets",
17 | "tileURL": "https://api.maptiler.com/maps/jp-mierune-streets/256/{z}/{x}/{y}.png?key=xxxxx",
18 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
19 | },
20 | {
21 | "value": "mieGray",
22 | "text": "MIERUNE Gray",
23 | "tileURL": "https://api.maptiler.com/maps/jp-mierune-gray/256/{z}/{x}/{y}.png?key=xxxxx",
24 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
25 | },
26 | {
27 | "value": "mieDark",
28 | "text": "MIERUNE Dark",
29 | "tileURL": "https://api.maptiler.com/maps/jp-mierune-dark/256/{z}/{x}/{y}.png?key=xxxxx",
30 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
31 | },
32 | {
33 | "value": "mieSatellite",
34 | "text": "MIERUNE Satellite",
35 | "tileURL": "https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=xxxxx",
36 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
37 | },
38 | {
39 | "value": "osm",
40 | "text": "OpenStreetMap",
41 | "tileURL": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
42 | "attribution": "© OpenStreetMap contributors"
43 | },
44 | {
45 | "value": "mapboxJapan",
46 | "text": "Mapbox Japan Data",
47 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
48 | "attribution": "© Mapbox © OpenStreetMap "
49 | },
50 | {
51 | "value": "mapStreets",
52 | "text": "Mapbox Streets",
53 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
54 | "attribution": "© Mapbox © OpenStreetMap "
55 | },
56 | {
57 | "value": "mapDark",
58 | "text": "Mapbox Dark",
59 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
60 | "attribution": "© Mapbox © OpenStreetMap "
61 | },
62 | {
63 | "value": "mapSatellite",
64 | "text": "Mapbox Satellite",
65 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
66 | "attribution": "© Mapbox © OpenStreetMap "
67 | },
68 | {
69 | "value": "esri",
70 | "text": "Esri",
71 | "tileURL": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}.png",
72 | "attribution": "Sources: Esri, HERE, Garmin, USGS, Intermap, INCREMENT P, NRCan, Esri Japan, METI, Esri China (Hong Kong), Esri Korea, Esri (Thailand), NGCC, (c) OpenStreetMap contributors, and the GIS User Community | Powered by Esri "
73 | },
74 | {
75 | "value": "bRoad",
76 | "text": "BingMaps Road",
77 | "bingMapsKey": "xxxxx",
78 | "imagerySet": "Road",
79 | "culture": "ja"
80 | },
81 | {
82 | "value": "gRoad",
83 | "text": "GoogleMaps Road",
84 | "googleMapsKey": "xxxxx",
85 | "type": "roadmap"
86 | },
87 | {
88 | "value": "apmapsStandard",
89 | "text": "Apple Maps Standard",
90 | "mapKitToken": "xxxxx",
91 | "type": "standard",
92 | "attribution": "© Apple Inc. "
93 | },
94 | {
95 | "value": "apmapsSatelite",
96 | "text": "Apple Maps Satellite",
97 | "mapKitToken": "xxxxx",
98 | "type": "satellite",
99 | "attribution": "© Apple Inc. "
100 | },
101 | {
102 | "value": "mapfan",
103 | "text": "MapFan",
104 | "mapFanAuthKey": "xxxxx",
105 | "tileURL": [
106 | "https://api-map-pre.mapfan.com/v1/map?key=",
107 | "=&landmarkicon=on&rotationangle=0&logo=on&tilematrix=EPSG:3857:{z}&tilerow={y}&tilecol={x}"
108 | ],
109 | "attribution": "© INCREMENT P CORPORATION"
110 | }
111 | ]
112 |
--------------------------------------------------------------------------------
/client/src/assets/PaneType.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "data": [
5 | {
6 | "heightVal": "81vh",
7 | "gridClass": "col-sm-12",
8 | "mapList": [
9 | {
10 | "mapId": "view1_1",
11 | "mapType": "tPale"
12 | }
13 | ]
14 | }
15 | ]
16 | },
17 | {
18 | "id": 2,
19 | "data": [
20 | {
21 | "heightVal": "81vh",
22 | "gridClass": "col-sm-6",
23 | "mapList": [
24 | {
25 | "mapId": "view2_1",
26 | "mapType": "tPale"
27 | },
28 | {
29 | "mapId": "view2_2",
30 | "mapType": "mieStreets"
31 | }
32 | ]
33 | }
34 | ]
35 | },
36 | {
37 | "id": 3,
38 | "data": [
39 | {
40 | "heightVal": "81vh",
41 | "gridClass": "col-sm-4",
42 | "mapList": [
43 | {
44 | "mapId": "view3_1",
45 | "mapType": "tPale"
46 | },
47 | {
48 | "mapId": "view3_2",
49 | "mapType": "mieStreets"
50 | },
51 | {
52 | "mapId": "view3_3",
53 | "mapType": "mapStreets"
54 | }
55 | ]
56 | }
57 | ]
58 | },
59 | {
60 | "id": 4,
61 | "data": [
62 | {
63 | "heightVal": "37vh",
64 | "gridClass": "col-sm-6",
65 | "mapList": [
66 | {
67 | "mapId": "view4_1",
68 | "mapType": "tPale"
69 | },
70 | {
71 | "mapId": "view4_2",
72 | "mapType": "mieStreets"
73 | },
74 | {
75 | "mapId": "view4_3",
76 | "mapType": "mapStreets"
77 | },
78 | {
79 | "mapId": "view4_4",
80 | "mapType": "apmapsStandard"
81 | }
82 | ]
83 | }
84 | ]
85 | },
86 | {
87 | "id": 6,
88 | "data": [
89 | {
90 | "heightVal": "37vh",
91 | "gridClass": "col-lg-4 col-md-6 col-sm-6",
92 | "mapList": [
93 | {
94 | "mapId": "view6_1",
95 | "mapType": "tPale"
96 | },
97 | {
98 | "mapId": "view6_2",
99 | "mapType": "mieStreets"
100 | },
101 | {
102 | "mapId": "view6_3",
103 | "mapType": "mapStreets"
104 | },
105 | {
106 | "mapId": "view6_4",
107 | "mapType": "apmapsStandard"
108 | },
109 | {
110 | "mapId": "view6_5",
111 | "mapType": "tOrt"
112 | },
113 | {
114 | "mapId": "view6_6",
115 | "mapType": "mieSatellite"
116 | }
117 | ]
118 | }
119 | ]
120 | },
121 | {
122 | "id": 8,
123 | "data": [
124 | {
125 | "heightVal": "37vh",
126 | "gridClass": "col-lg-3 col-md-6 col-sm-6",
127 | "mapList": [
128 | {
129 | "mapId": "view8_1",
130 | "mapType": "tPale"
131 | },
132 | {
133 | "mapId": "view8_2",
134 | "mapType": "mieStreets"
135 | },
136 | {
137 | "mapId": "view8_3",
138 | "mapType": "mapStreets"
139 | },
140 | {
141 | "mapId": "view8_4",
142 | "mapType": "apmapsStandard"
143 | },
144 | {
145 | "mapId": "view8_5",
146 | "mapType": "tOrt"
147 | },
148 | {
149 | "mapId": "view8_6",
150 | "mapType": "mieSatellite"
151 | },
152 | {
153 | "mapId": "view8_7",
154 | "mapType": "mapSatellite"
155 | },
156 | {
157 | "mapId": "view8_8",
158 | "mapType": "apmapsSatelite"
159 | }
160 | ]
161 | }
162 | ]
163 | }
164 | ]
165 |
--------------------------------------------------------------------------------
/client/src/assets/mierune.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/client/src/assets/mierune.png
--------------------------------------------------------------------------------
/client/src/assets/sorry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/client/src/assets/sorry.png
--------------------------------------------------------------------------------
/client/src/assets/trusts_of_gi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/client/src/assets/trusts_of_gi.png
--------------------------------------------------------------------------------
/client/src/components/Loading.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
30 |
31 |
45 |
--------------------------------------------------------------------------------
/client/src/components/MapAdd.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
159 |
160 |
171 |
--------------------------------------------------------------------------------
/client/src/components/Menu.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
69 |
70 |
71 |
184 |
185 |
210 |
--------------------------------------------------------------------------------
/client/src/components/ZoomLevel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | zoom = {{ zoom }}
4 |
5 |
6 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/client/src/main.js:
--------------------------------------------------------------------------------
1 | import '@babel/polyfill';
2 | import 'mutationobserver-shim';
3 | import Vue from 'vue';
4 |
5 | import App from './App.vue';
6 | import router from './router';
7 | import store from './store';
8 |
9 | //vue-analytics読み込み
10 | import VueAnalytics from 'vue-analytics';
11 | // axios読み込み
12 | import './plugins/axios';
13 | // bootstrap-vue読み込み
14 | import './plugins/bootstrap-vue';
15 | // Leaflet読み込み
16 | import 'leaflet/dist/leaflet.css';
17 | // Leafletプラグイン読み込み
18 | import 'leaflet.gridlayer.googlemutant';
19 | import 'leaflet-bing-layer';
20 | import 'leaflet.sync';
21 | import 'leaflet.mapkitmutant';
22 | // Apple MapKit読み込み
23 | import 'apple-mapkit-js';
24 |
25 | Vue.config.productionTip = false;
26 |
27 | // Google アナリティクス適用
28 | Vue.use(VueAnalytics, {
29 | id: 'UA-57375666-12',
30 | router,
31 | });
32 |
33 | new Vue({
34 | router,
35 | store,
36 | render: h => h(App),
37 | }).$mount('#app');
38 |
--------------------------------------------------------------------------------
/client/src/plugins/axios.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | import Vue from 'vue';
4 | import axios from "axios";
5 |
6 | // Full config: https://github.com/axios/axios#request-config
7 | // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
8 | // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
9 | // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
10 |
11 | let config = {
12 | // baseURL: process.env.baseURL || process.env.apiUrl || ""
13 | // timeout: 60 * 1000, // Timeout
14 | // withCredentials: true, // Check cross-site Access-Control
15 | };
16 |
17 | const _axios = axios.create(config);
18 |
19 | _axios.interceptors.request.use(
20 | function(config) {
21 | // Do something before request is sent
22 | return config;
23 | },
24 | function(error) {
25 | // Do something with request error
26 | return Promise.reject(error);
27 | }
28 | );
29 |
30 | // Add a response interceptor
31 | _axios.interceptors.response.use(
32 | function(response) {
33 | // Do something with response data
34 | return response;
35 | },
36 | function(error) {
37 | // Do something with response error
38 | return Promise.reject(error);
39 | }
40 | );
41 |
42 | Plugin.install = function(Vue, options) {
43 | Vue.axios = _axios;
44 | window.axios = _axios;
45 | Object.defineProperties(Vue.prototype, {
46 | axios: {
47 | get() {
48 | return _axios;
49 | }
50 | },
51 | $axios: {
52 | get() {
53 | return _axios;
54 | }
55 | },
56 | });
57 | };
58 |
59 | Vue.use(Plugin)
60 |
61 | export default Plugin;
62 |
--------------------------------------------------------------------------------
/client/src/plugins/bootstrap-vue.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | import BootstrapVue from 'bootstrap-vue'
4 | import 'bootstrap/dist/css/bootstrap.min.css'
5 | import 'bootstrap-vue/dist/bootstrap-vue.css'
6 |
7 | Vue.use(BootstrapVue)
8 |
--------------------------------------------------------------------------------
/client/src/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Router from 'vue-router';
3 | import store from './store';
4 |
5 | // 各view読み込み
6 | import View404 from './views/View404.vue';
7 | import Help from './views/Help.vue';
8 | import Pane from './views/Pane.vue';
9 |
10 | Vue.use(Router);
11 |
12 | const router = new Router({
13 | // #を無くすためにはサーバーの設定も必要
14 | mode: 'history',
15 | routes: [
16 | {
17 | // ペインページ初期表示用 (1,2,3,4,6,8のみ)
18 | path: '/:id([123468])/:zoom(\\d+)/:lat([-]?\\d+[.]?[\\d]*)/:lng([-]?\\d+[.]?[\\d]*)/:layer(.+)',
19 | name: 'paneLatLng',
20 | component: Pane,
21 | // ペイン・ズーム・経度・緯度・レイヤ情報を格納
22 | props: route => ({
23 | id: Number(route.params.id),
24 | zoom: Number(route.params.zoom),
25 | lat: Number(route.params.lat),
26 | lng: Number(route.params.lng),
27 | layer: String(route.params.layer),
28 | }),
29 | },
30 | {
31 | // ペインページ遷移用 (1,2,3,4,6,8のみ)
32 | path: '/:id([123468])',
33 | name: 'paneChange',
34 | component: Pane,
35 | beforeEnter(to, from, next) {
36 | // 画面遷移後のマップURL生成
37 | store.dispatch('getNextMapTypeUrl', to.params.id);
38 | // 画面遷移後のURL設定
39 | const redirectPath =
40 | '/' +
41 | [
42 | to.params.id,
43 | store.state.zoom,
44 | store.state.lat,
45 | store.state.lng,
46 | store.state.nextMapTypeUrl,
47 | ].join('/');
48 | // ページ遷移
49 | next({ path: redirectPath });
50 | },
51 | // ペイン情報を格納
52 | props: route => ({
53 | id: Number(route.params.id),
54 | }),
55 | },
56 | {
57 | // ヘルプページ
58 | path: '/help',
59 | name: 'help',
60 | component: Help,
61 | },
62 | {
63 | // 404ページ
64 | path: '*',
65 | name: 'view404',
66 | component: View404,
67 | },
68 | {
69 | // ルートページリダイレクト
70 | path: '/',
71 | redirect: store.state.rootUrl,
72 | },
73 | ],
74 | });
75 |
76 | // ナビゲーションの前に実行
77 | router.beforeEach((to, from, next) => {
78 | store.commit('setLoading', true);
79 | setTimeout(next, 2000);
80 | });
81 |
82 | // ナビゲーションの後に実行
83 | router.afterEach(() => {
84 | store.commit('setLoading', false);
85 | });
86 |
87 | export default router;
88 |
--------------------------------------------------------------------------------
/client/src/store.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuex from 'vuex';
3 | import axios from 'axios';
4 | import axiosJsonpAdapter from 'axios-jsonp';
5 |
6 | Vue.use(Vuex);
7 |
8 | export default new Vuex.Store({
9 | state: {
10 | // ローディング
11 | loading: false,
12 | // ペイン・ズームレベル・緯度・経度
13 | id: 3,
14 | zoom: 14,
15 | lat: 35.6795,
16 | lng: 139.7672,
17 | // レイヤ順情報
18 | mapTypeList: [],
19 | // ペイン配置情報管理
20 | mapTypeJson: null,
21 | // 初期URL
22 | rootUrl: '/3/14/35.6795/139.7672/tPale/mieStreets/mapStreets',
23 | // 現在のレイヤ順情報URL
24 | nowMapTypeUrl: '',
25 | // 画面遷移後のレイヤ順情報URL
26 | nextMapTypeUrl: '',
27 | // MapFanAPIキー
28 | mapFanApiKey: '',
29 | // 住所検索で返ってきたリスト
30 | searchResultList: null,
31 | // 住所検索用のlatlng
32 | mapCoordinates:[],
33 | // 住所検索の際、何も検索されなかった時などのメッセージ用
34 | searchResultMsg: '',
35 | },
36 | mutations: {
37 | // ローダー状態格納
38 | setLoading(state, payload) {
39 | state.loading = payload;
40 | },
41 | // 初期ペイン配置情報格納
42 | setDefaultMapTypeJson(state, paneTypeJson) {
43 | state.mapTypeJson = paneTypeJson;
44 | },
45 | // ペイン・ズーム・緯度・経度・レイヤ順情報を格納
46 | setLocationInfo(state, val) {
47 | state.id = val.id;
48 | state.lat = val.lat;
49 | state.lng = val.lng;
50 | state.zoom = val.zoom;
51 | state.mapTypeList = val.mapTypeList;
52 | },
53 | // レイヤ順情報格納
54 | setMapTypeList(state, mapTypeList) {
55 | state.mapTypeList[mapTypeList.index] = mapTypeList.selected;
56 | },
57 | // 現在のレイヤ順情報URL格納
58 | setNowMapTypeUrl(state, nowMapTypeUrl) {
59 | state.nowMapTypeUrl = nowMapTypeUrl;
60 | },
61 | // 画面遷移後のレイヤ順情報URL格納
62 | setNextMapTypeUrl(state, nextMapTypeUrl) {
63 | state.nextMapTypeUrl = nextMapTypeUrl;
64 | },
65 | // レイヤ切り替え後のレイヤ順情報URL格納
66 | setSelectMapTypeUrl(state, selectMapTypeUrl) {
67 | state.selectMapTypeUrl = selectMapTypeUrl;
68 | },
69 | // ペイン配置情報更新
70 | setMapTypeJson(state, select) {
71 | for (const v of state.mapTypeJson) {
72 | try {
73 | v.data[0].mapList[select.index].mapType = select.selected;
74 | } catch (e) {
75 | continue;
76 | }
77 | }
78 | },
79 | // URL貼り付け時ペイン配置情報更新
80 | pastingMapTypeJson(state, mapTypeList) {
81 | for (let index = 0; index < mapTypeList.length; index++) {
82 | for (const v of state.mapTypeJson) {
83 | try {
84 | v.data[0].mapList[index].mapType = mapTypeList[index];
85 | } catch (e) {
86 | continue;
87 | }
88 | }
89 | }
90 | },
91 | // MapFanAPIキー格納
92 | getMapFanApiKey(state, mapFanApiKey) {
93 | state.mapFanApiKey = mapFanApiKey;
94 | },
95 | // 住所検索時緯度経度登録
96 | setCoordinatesInfo(state, val) {
97 | state.mapCoordinates = [val.lat, val.lng];
98 | },
99 | // 住所検索時結果リスト格納
100 | setSearchResultList(state, val) {
101 | state.searchResultList = val;
102 | },
103 | // 住所検索時メッセージ
104 | setSearchResultMsg(state, val) {
105 | state.searchResultMsg = val;
106 | },
107 | },
108 | actions: {
109 | // 各情報をstateに格納
110 | getInfo(context, info) {
111 | // 現在のレイヤ順情報URL作成
112 | let nowMapTypeUrl = info.mapTypeList.join('/');
113 | // URLを動的に変更
114 | let url = '/' + [info.id, info.zoom, info.lat, info.lng, nowMapTypeUrl].join('/');
115 | history.replaceState('', '', url);
116 | // ペイン・ズーム・緯度・経度格納
117 | context.commit('setLocationInfo', info);
118 | // 現在のレイヤ順情報URL格納
119 | context.commit('setNowMapTypeUrl', nowMapTypeUrl);
120 | },
121 | // 画面遷移後のレイヤ順情報URLをstateに格納
122 | getNextMapTypeUrl(context, id) {
123 | // 画面遷移後のレイヤ順情報取得
124 | let nextMapList = [];
125 | for (const v of this.state.mapTypeJson) {
126 | if (v.id === Number(id)) {
127 | for (let i = 0; i < this.state.mapTypeList.length; i++) {
128 | try {
129 | nextMapList.push(v.data[0].mapList[i].mapType);
130 | } catch (e) {
131 | continue;
132 | }
133 | }
134 | }
135 | }
136 | // 画面遷移後のレイヤ順情報URL生成
137 | let nextMapTypeUrl;
138 | if (nextMapList.length === 1) {
139 | nextMapTypeUrl = nextMapList[0];
140 | } else {
141 | nextMapTypeUrl = nextMapList.join('/');
142 | }
143 | // 画面遷移後のレイヤ順情報URLを格納
144 | context.commit('setNextMapTypeUrl', nextMapTypeUrl);
145 | },
146 | // MapFan認証キー取得
147 | async getMapFanApiKeyAction(context, mapFanAuthKey) {
148 | // https://api-auth-pre.mapfan.com/v1/auth?appid=APIキー&date=20171101102029
149 | const mapFanAuthUrl =
150 | 'https://api-auth-pre.mapfan.com/v1/auth?appid=' +
151 | mapFanAuthKey +
152 | '&date=20171101102029';
153 | let mapFanApiKey;
154 | await axios
155 | .get(mapFanAuthUrl, {
156 | adapter: axiosJsonpAdapter,
157 | })
158 | .then(res => {
159 | mapFanApiKey = res.data.key;
160 | });
161 | // MapFanAPIキー格納
162 | context.commit('getMapFanApiKey', mapFanApiKey);
163 | },
164 | // 逆ジオコーディング
165 | async getSearchPointAction(context, searchText) {
166 | if (searchText === ''){
167 | // 入力が無い場合
168 | context.commit('setSearchResultMsg', '検索キーワードを入力してください');
169 | return;
170 | }
171 | const searchUrl =
172 | 'https://msearch.gsi.go.jp/address-search/AddressSearch?q=' +
173 | searchText;
174 | await axios
175 | .get(searchUrl)
176 | .then(res => {
177 | let jsonData = JSON.stringify(res.data);
178 | let encoded_json = JSON.parse(jsonData);
179 | if (encoded_json.length == 0) {
180 | // 住所検索結果が返ってこなかった場合
181 | context.commit('setSearchResultMsg', '該当する候補地点がありません。他の検索キーワードを入力してください');
182 | return;
183 | }
184 | if (encoded_json.length > 100) {
185 | // 検索結果が多すぎる場合
186 | context.commit('setSearchResultMsg', '検索結果が100件を超えました、検索キーワードを増やしてください');
187 | encoded_json.length = 100;
188 | } else {
189 | context.commit('setSearchResultMsg', '');
190 | }
191 | // 結果リスト保存
192 | context.commit('setSearchResultList', encoded_json);
193 | });
194 | }
195 | },
196 | });
197 |
--------------------------------------------------------------------------------
/client/src/views/Help.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Japan Map Compare: mapcompare.jp
10 |
11 | mapcompare.jpはOpenStreetMap, MapTiler, MapBox, Bing, Google, Apple, ESRI, Mapfan,
12 | 地理院地図などの日本国内を対象としたウェブ地図を比較可能なページです。
13 | GeofabrikとBBBikeが開発してきた Map Compare(
14 | Geofabrik版
15 | ・BBBike版 )のアイデアをベースに、
16 | Leaflet, Vue.jsなどの新しいウェブ地図技術を用いて構築したものです。
17 |
18 |
19 | 表示しているページのパーマリンクは下記の例のように作成できます
20 |
21 |
22 | https://mapcompare.jp/3{number of panels}/14{zoom
23 | level}/35.6795{lat}/139.7672{lon}/tPale{webmap_1}/osm{webmap_2}/tOrt{webmap_3}
24 |
25 |
26 | MapBox, Bing Maps, Google Maps, Apple Maps, Mapfanは、相互に閲覧比較するためのみ用いることができます。
27 | OpenStreetMapのデータ編集のために、これらのウェブ地図のデータを絶対に用いないでください。
28 |
29 |
30 |
31 |
32 | 比較可能なウェブ地図一覧 {webmap}:
33 |
34 |
35 |
36 |
37 | このページは下記の研究プロジェクトによって開発されています:
38 |
39 |
43 | 2018-2021年度科学研究費基盤研究 (B) (特設分野) : クラウドソース型地理情報のトラスト
44 |
45 |
46 |
50 |
51 |
52 |
53 |
57 | ・State of the Map 2019 Lightning Talk
58 |
59 |
60 |
61 |
62 |
63 | メールアドレス:
64 | mapcomparejp[at]gmail.com
65 |
66 |
67 |
68 | 開発:
69 | MIERUNE Inc.
70 |
71 |
72 |
73 |
74 |
75 |
76 | ライセンス:
77 |
78 | 地理院地図/Maptiler/MapBox/Bing/Google/ESRI/Mapfanを除くOpenStreetMapベースのデータは
79 | © OpenStreetMap (License: ODbL 1.0), OSMタイル CC-BY-SA 2.0
80 |
81 |
82 | mapcompare.jpのソースコードは
83 | 2-Clause BSDライセンス により公開されています
86 |
87 |
88 |
89 |
90 | GitHub:
91 |
92 | mapcomparejp/JapanMapCompare
97 |
98 |
99 |
100 |
101 | 検証済みブラウザ:
102 | Google Chrome (最新版)
103 | Firefox (最新版)
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | Japan Map Compare: mapcompare.jp
112 |
113 | Japan Map Compare can compare the various webmaps focusing on Japan area including
114 | OpenStreetMap, MapTiler, MapBox, Bing, Google, Apple, ESRI, Mapfan and GSI Map.
115 | It is inspired by Map Compare coded by
116 | Geofabrik
117 | and BBBike
118 | (Thanks a lot!!) and is developed using modern webmapping technologies like Leaflet, Vue.js…
119 |
120 |
121 | You can use permalink to save the current status of showing page as below example.
122 |
123 |
124 | https://mapcompare.jp/3{number of panels}/14{zoom
125 | level}/35.6795{lat}/139.7672{lon}/tPale{webmap_1}/osm{webmap_2}/tOrt{webmap_3}
126 |
127 |
128 | Comparison with MapBox, Bing Maps, Google Maps, Apple Maps, Mapfan is for informational
129 | purposes only. Do not use information from these webmaps to edit OpenStreetMap data.
130 |
131 |
132 |
133 |
134 | Comparable webmaps {webmap}:
135 |
136 |
137 |
138 |
139 | developed by:
140 |
141 |
145 | JSPS Scientific Research (B) (Generative Research Fields) Project: Trusts of Crowdsourced Geographic Information
146 |
147 |
148 |
152 |
153 |
154 |
155 |
159 | ・State of the Map 2019 Lightning Talk
160 |
161 |
162 |
163 |
164 |
165 | Contact us:
166 | mapcomparejp[at]gmail.com
167 |
168 |
169 |
170 | Developed by:
171 | MIERUNE Inc.
172 |
173 |
174 |
175 |
176 |
177 |
178 | License:
179 |
180 | All maps except GSI Maps(地理院地図)/MapBox/Bing/Google/ESRI/Mapfan based on OSM data © OpenStreetMap (License: ODbL 1.0), OSM Tiles licensed CC-BY-SA 2.0
181 |
182 |
183 | The source code of Japan Map Compare is licensed under The
184 | 2-Clause BSD License
187 |
188 |
189 |
190 |
191 | GitHub:
192 |
193 | mapcomparejp/JapanMapCompare
198 |
199 |
200 |
201 |
202 | Supported browsers:
203 | Google Chrome (Latest edition)
204 | Firefox (Latest edition)
205 |
206 |
207 |
208 |
209 |
210 |
211 |
390 |
391 |
399 |
--------------------------------------------------------------------------------
/client/src/views/Pane.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/client/src/views/View404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | No Page
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
29 |
--------------------------------------------------------------------------------
/client/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | productionSourceMap: false,
3 | };
4 |
--------------------------------------------------------------------------------
/img/JapanMapCompare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/img/JapanMapCompare.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "japanmapcompare",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios-jsonp": "^1.0.2",
12 | "bootstrap-vue": "^2.0.0-rc.19",
13 | "core-js": "^2.6.5",
14 | "leaflet": "^1.5.1",
15 | "leaflet-bing-layer": "^3.3.1",
16 | "leaflet.gridlayer.googlemutant": "^0.8.0",
17 | "leaflet.sync": "^0.2.4",
18 | "scriptjs": "^2.5.9",
19 | "vue": "^2.6.10",
20 | "vue-analytics": "^5.17.0",
21 | "vue-router": "^3.0.3",
22 | "vue-spinner": "^1.0.3",
23 | "vuex": "^3.0.1"
24 | },
25 | "devDependencies": {
26 | "@babel/polyfill": "^7.4.4",
27 | "@vue/cli-plugin-babel": "^3.8.0",
28 | "@vue/cli-plugin-eslint": "^3.8.0",
29 | "@vue/cli-service": "^3.8.0",
30 | "axios": "^0.21.2",
31 | "babel-eslint": "^10.0.1",
32 | "bootstrap": "^4.3.1",
33 | "eslint": "^5.16.0",
34 | "eslint-plugin-vue": "^5.0.0",
35 | "mutationobserver-shim": "^0.3.3",
36 | "node-sass": "^7.0.0",
37 | "popper.js": "^1.15.0",
38 | "portal-vue": "^2.1.4",
39 | "sass-loader": "^7.1.0",
40 | "vue-cli-plugin-bootstrap-vue": "^0.4.0",
41 | "vue-template-compiler": "^2.6.10"
42 | },
43 | "eslintConfig": {
44 | "root": true,
45 | "env": {
46 | "node": true
47 | },
48 | "extends": [
49 | "plugin:vue/essential",
50 | "eslint:recommended"
51 | ],
52 | "rules": {},
53 | "parserOptions": {
54 | "parser": "babel-eslint"
55 | }
56 | },
57 | "postcss": {
58 | "plugins": {
59 | "autoprefixer": {}
60 | }
61 | },
62 | "browserslist": [
63 | "> 1%",
64 | "last 2 versions"
65 | ]
66 | }
67 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | JapanMapCompare
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
57 |
58 |
77 |
--------------------------------------------------------------------------------
/src/assets/MapType.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "value": "tPale",
4 | "text": "地理院地図 淡色",
5 | "tileURL": "https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",
6 | "attribution": "国土地理院 "
7 | },
8 | {
9 | "value": "tOrt",
10 | "text": "地理院地図 オルソ",
11 | "tileURL": "https://cyberjapandata.gsi.go.jp/xyz/seamlessphoto/{z}/{x}/{y}.jpg",
12 | "attribution": "国土地理院 "
13 | },
14 | {
15 | "value": "mieStreets",
16 | "text": "MIERUNE Streets",
17 | "tileURL": "https://api.maptiler.com/maps/jp-mierune-streets/256/{z}/{x}/{y}.png?key=xxxxx",
18 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
19 | },
20 | {
21 | "value": "mieGray",
22 | "text": "MIERUNE Gray",
23 | "tileURL": "https://api.maptiler.com/maps/jp-mierune-gray/256/{z}/{x}/{y}.png?key=xxxxx",
24 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
25 | },
26 | {
27 | "value": "mieDark",
28 | "text": "MIERUNE Dark",
29 | "tileURL": "https://api.maptiler.com/maps/jp-mierune-dark/256/{z}/{x}/{y}.png?key=xxxxx",
30 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
31 | },
32 | {
33 | "value": "mieSatellite",
34 | "text": "MIERUNE Satellite",
35 | "tileURL": "https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=xxxxx",
36 | "attribution": "© MIERUNE © MapTiler © OpenStreetMap contributors "
37 | },
38 | {
39 | "value": "osm",
40 | "text": "OpenStreetMap",
41 | "tileURL": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
42 | "attribution": "© OpenStreetMap contributors"
43 | },
44 | {
45 | "value": "mapStreets",
46 | "text": "Mapbox Streets",
47 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
48 | "attribution": "© Mapbox © OpenStreetMap "
49 | },
50 | {
51 | "value": "mapDark",
52 | "text": "Mapbox Dark",
53 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
54 | "attribution": "© Mapbox © OpenStreetMap "
55 | },
56 | {
57 | "value": "mapSatellite",
58 | "text": "Mapbox Satellite",
59 | "tileURL": "https://api.mapbox.com/styles/v1/xxxxx/xxxxx/tiles/256/{z}/{x}/{y}?access_token=xxxxx",
60 | "attribution": "© Mapbox © OpenStreetMap "
61 | },
62 | {
63 | "value": "esri",
64 | "text": "ESRI",
65 | "tileURL": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}.png",
66 | "attribution": "© ESRI contributors"
67 | },
68 | {
69 | "value": "bRoad",
70 | "text": "BingMaps Road",
71 | "bingMapsKey": "xxxxx",
72 | "imagerySet": "Road",
73 | "culture": "ja"
74 | },
75 | {
76 | "value": "gRoad",
77 | "text": "GoogleMaps Road",
78 | "googleMapsKey": "xxxxx",
79 | "type": "roadmap"
80 | },
81 | {
82 | "value": "mapfan",
83 | "text": "Mapfan",
84 | "mapFanAuthKey": "xxxxx",
85 | "tileURL": [
86 | "https://api-map-pre.mapfan.com/v1/map?key=",
87 | "=&landmarkicon=on&rotationangle=0&logo=on&tilematrix=EPSG:3857:{z}&tilerow={y}&tilecol={x}"
88 | ],
89 | "attribution": "© INCREMENT P CORPORATION"
90 | }
91 | ]
92 |
--------------------------------------------------------------------------------
/src/assets/PaneType.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "data": [
5 | {
6 | "heightVal": "81vh",
7 | "gridClass": "col-sm-12",
8 | "mapList": [
9 | {
10 | "mapId": "view1_1",
11 | "mapType": "tPale"
12 | }
13 | ]
14 | }
15 | ]
16 | },
17 | {
18 | "id": 2,
19 | "data": [
20 | {
21 | "heightVal": "81vh",
22 | "gridClass": "col-sm-6",
23 | "mapList": [
24 | {
25 | "mapId": "view2_1",
26 | "mapType": "tPale"
27 | },
28 | {
29 | "mapId": "view2_2",
30 | "mapType": "osm"
31 | }
32 | ]
33 | }
34 | ]
35 | },
36 | {
37 | "id": 3,
38 | "data": [
39 | {
40 | "heightVal": "81vh",
41 | "gridClass": "col-sm-4",
42 | "mapList": [
43 | {
44 | "mapId": "view3_1",
45 | "mapType": "tPale"
46 | },
47 | {
48 | "mapId": "view3_2",
49 | "mapType": "osm"
50 | },
51 | {
52 | "mapId": "view3_3",
53 | "mapType": "mieStreets"
54 | }
55 | ]
56 | }
57 | ]
58 | },
59 | {
60 | "id": 4,
61 | "data": [
62 | {
63 | "heightVal": "37vh",
64 | "gridClass": "col-sm-6",
65 | "mapList": [
66 | {
67 | "mapId": "view4_1",
68 | "mapType": "tPale"
69 | },
70 | {
71 | "mapId": "view4_2",
72 | "mapType": "osm"
73 | },
74 | {
75 | "mapId": "view4_3",
76 | "mapType": "mieStreets"
77 | },
78 | {
79 | "mapId": "view4_4",
80 | "mapType": "mapStreets"
81 | }
82 | ]
83 | }
84 | ]
85 | },
86 | {
87 | "id": 6,
88 | "data": [
89 | {
90 | "heightVal": "37vh",
91 | "gridClass": "col-lg-4 col-md-6 col-sm-6",
92 | "mapList": [
93 | {
94 | "mapId": "view6_1",
95 | "mapType": "tPale"
96 | },
97 | {
98 | "mapId": "view6_2",
99 | "mapType": "osm"
100 | },
101 | {
102 | "mapId": "view6_3",
103 | "mapType": "mieStreets"
104 | },
105 | {
106 | "mapId": "view6_4",
107 | "mapType": "mapStreets"
108 | },
109 | {
110 | "mapId": "view6_5",
111 | "mapType": "esri"
112 | },
113 | {
114 | "mapId": "view6_6",
115 | "mapType": "tOrt"
116 | }
117 | ]
118 | }
119 | ]
120 | },
121 | {
122 | "id": 8,
123 | "data": [
124 | {
125 | "heightVal": "37vh",
126 | "gridClass": "col-lg-3 col-md-6 col-sm-6",
127 | "mapList": [
128 | {
129 | "mapId": "view8_1",
130 | "mapType": "tPale"
131 | },
132 | {
133 | "mapId": "view8_2",
134 | "mapType": "osm"
135 | },
136 | {
137 | "mapId": "view8_3",
138 | "mapType": "mieStreets"
139 | },
140 | {
141 | "mapId": "view8_4",
142 | "mapType": "mapStreets"
143 | },
144 | {
145 | "mapId": "view8_5",
146 | "mapType": "esri"
147 | },
148 | {
149 | "mapId": "view8_6",
150 | "mapType": "tOrt"
151 | },
152 | {
153 | "mapId": "view8_7",
154 | "mapType": "mieSatellite"
155 | },
156 | {
157 | "mapId": "view8_8",
158 | "mapType": "mapSatellite"
159 | }
160 | ]
161 | }
162 | ]
163 | }
164 | ]
165 |
--------------------------------------------------------------------------------
/src/assets/mierune.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/src/assets/mierune.png
--------------------------------------------------------------------------------
/src/assets/sorry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/src/assets/sorry.png
--------------------------------------------------------------------------------
/src/assets/trusts_of_gi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mapcomparejp/JapanMapCompare/a0b579dff9d3c361bd111ecdd10e6f06ef931f5a/src/assets/trusts_of_gi.png
--------------------------------------------------------------------------------
/src/components/Loading.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
30 |
31 |
45 |
--------------------------------------------------------------------------------
/src/components/MapAdd.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
136 |
137 |
148 |
--------------------------------------------------------------------------------
/src/components/Menu.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
31 |
32 |
33 |
50 |
51 |
66 |
--------------------------------------------------------------------------------
/src/components/ZoomLevel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | zoom = {{ zoom }}
4 |
5 |
6 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import '@babel/polyfill';
2 | import 'mutationobserver-shim';
3 | import Vue from 'vue';
4 |
5 | import App from './App.vue';
6 | import router from './router';
7 | import store from './store';
8 |
9 | //vue-analytics読み込み
10 | import VueAnalytics from 'vue-analytics';
11 | // axios読み込み
12 | import './plugins/axios';
13 | // bootstrap-vue読み込み
14 | import './plugins/bootstrap-vue';
15 | // Leaflet読み込み
16 | import 'leaflet/dist/leaflet.css';
17 | // Leafletプラグイン読み込み
18 | import 'leaflet.gridlayer.googlemutant';
19 | import 'leaflet-bing-layer';
20 | import 'leaflet.sync';
21 |
22 | Vue.config.productionTip = false;
23 |
24 | // Google アナリティクス適用
25 | Vue.use(VueAnalytics, {
26 | id: 'UA-57375666-12',
27 | router,
28 | });
29 |
30 | new Vue({
31 | router,
32 | store,
33 | render: h => h(App),
34 | }).$mount('#app');
35 |
--------------------------------------------------------------------------------
/src/plugins/axios.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | import Vue from 'vue';
4 | import axios from "axios";
5 |
6 | // Full config: https://github.com/axios/axios#request-config
7 | // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
8 | // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
9 | // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
10 |
11 | let config = {
12 | // baseURL: process.env.baseURL || process.env.apiUrl || ""
13 | // timeout: 60 * 1000, // Timeout
14 | // withCredentials: true, // Check cross-site Access-Control
15 | };
16 |
17 | const _axios = axios.create(config);
18 |
19 | _axios.interceptors.request.use(
20 | function(config) {
21 | // Do something before request is sent
22 | return config;
23 | },
24 | function(error) {
25 | // Do something with request error
26 | return Promise.reject(error);
27 | }
28 | );
29 |
30 | // Add a response interceptor
31 | _axios.interceptors.response.use(
32 | function(response) {
33 | // Do something with response data
34 | return response;
35 | },
36 | function(error) {
37 | // Do something with response error
38 | return Promise.reject(error);
39 | }
40 | );
41 |
42 | Plugin.install = function(Vue, options) {
43 | Vue.axios = _axios;
44 | window.axios = _axios;
45 | Object.defineProperties(Vue.prototype, {
46 | axios: {
47 | get() {
48 | return _axios;
49 | }
50 | },
51 | $axios: {
52 | get() {
53 | return _axios;
54 | }
55 | },
56 | });
57 | };
58 |
59 | Vue.use(Plugin)
60 |
61 | export default Plugin;
62 |
--------------------------------------------------------------------------------
/src/plugins/bootstrap-vue.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | import BootstrapVue from 'bootstrap-vue'
4 | import 'bootstrap/dist/css/bootstrap.min.css'
5 | import 'bootstrap-vue/dist/bootstrap-vue.css'
6 |
7 | Vue.use(BootstrapVue)
8 |
--------------------------------------------------------------------------------
/src/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Router from 'vue-router';
3 | import store from './store';
4 |
5 | // 各view読み込み
6 | import View404 from './views/View404.vue';
7 | import Help from './views/Help.vue';
8 | import Pane from './views/Pane.vue';
9 |
10 | Vue.use(Router);
11 |
12 | const router = new Router({
13 | // #を無くすためにはサーバーの設定も必要
14 | mode: 'history',
15 | routes: [
16 | {
17 | // ペインページ初期表示用 (1,2,3,4,6,8のみ)
18 | path: '/:id([123468])/:zoom(\\d+)/:lat(\\d+.\\d+)/:lng(\\d+.\\d+)/:layer(.+)',
19 | name: 'paneLatLng',
20 | component: Pane,
21 | // ペイン・ズーム・経度・緯度・レイヤ情報を格納
22 | props: route => ({
23 | id: Number(route.params.id),
24 | zoom: Number(route.params.zoom),
25 | lat: Number(route.params.lat),
26 | lng: Number(route.params.lng),
27 | layer: String(route.params.layer),
28 | }),
29 | },
30 | {
31 | // ペインページ遷移用 (1,2,3,4,6,8のみ)
32 | path: '/:id([123468])',
33 | name: 'paneChange',
34 | component: Pane,
35 | beforeEnter(to, from, next) {
36 | // 画面遷移後のマップURL生成
37 | store.dispatch('getNextMapTypeUrl', to.params.id);
38 | // 画面遷移後のURL設定
39 | const redirectPath =
40 | '/' +
41 | [
42 | to.params.id,
43 | store.state.zoom,
44 | store.state.lat,
45 | store.state.lng,
46 | store.state.nextMapTypeUrl,
47 | ].join('/');
48 | // ページ遷移
49 | next({ path: redirectPath });
50 | },
51 | // ペイン情報を格納
52 | props: route => ({
53 | id: Number(route.params.id),
54 | }),
55 | },
56 | {
57 | // ヘルプページ
58 | path: '/help',
59 | name: 'help',
60 | component: Help,
61 | },
62 | {
63 | // 404ページ
64 | path: '*',
65 | name: 'view404',
66 | component: View404,
67 | },
68 | {
69 | // ルートページリダイレクト
70 | path: '/',
71 | redirect: store.state.rootUrl,
72 | },
73 | ],
74 | });
75 |
76 | // ナビゲーションの前に実行
77 | router.beforeEach((to, from, next) => {
78 | store.commit('setLoading', true);
79 | setTimeout(next, 2000);
80 | });
81 |
82 | // ナビゲーションの後に実行
83 | router.afterEach(() => {
84 | store.commit('setLoading', false);
85 | });
86 |
87 | export default router;
88 |
--------------------------------------------------------------------------------
/src/store.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuex from 'vuex';
3 | import axios from 'axios';
4 | import axiosJsonpAdapter from 'axios-jsonp';
5 |
6 | Vue.use(Vuex);
7 |
8 | export default new Vuex.Store({
9 | state: {
10 | // ローディング
11 | loading: false,
12 | // ペイン・ズームレベル・緯度・経度
13 | id: 3,
14 | zoom: 14,
15 | lat: 35.6795,
16 | lng: 139.7672,
17 | // レイヤ順情報
18 | mapTypeList: [],
19 | // ペイン配置情報管理
20 | mapTypeJson: null,
21 | // 初期URL
22 | rootUrl: '/3/14/35.6795/139.7672/tPale/osm/mieStreets',
23 | // 現在のレイヤ順情報URL
24 | nowMapTypeUrl: '',
25 | // 画面遷移後のレイヤ順情報URL
26 | nextMapTypeUrl: '',
27 | // MapFanAPIキー
28 | mapFanApiKey: '',
29 | },
30 | mutations: {
31 | // ローダー状態格納
32 | setLoading(state, payload) {
33 | state.loading = payload;
34 | },
35 | // 初期ペイン配置情報格納
36 | setDefaultMapTypeJson(state, paneTypeJson) {
37 | state.mapTypeJson = paneTypeJson;
38 | },
39 | // ペイン・ズーム・緯度・経度・レイヤ順情報を格納
40 | setLocationInfo(state, val) {
41 | state.id = val.id;
42 | state.lat = val.lat;
43 | state.lng = val.lng;
44 | state.zoom = val.zoom;
45 | state.mapTypeList = val.mapTypeList;
46 | },
47 | // レイヤ順情報格納
48 | setMapTypeList(state, mapTypeList) {
49 | state.mapTypeList[mapTypeList.index] = mapTypeList.selected;
50 | },
51 | // 現在のレイヤ順情報URL格納
52 | setNowMapTypeUrl(state, nowMapTypeUrl) {
53 | state.nowMapTypeUrl = nowMapTypeUrl;
54 | },
55 | // 画面遷移後のレイヤ順情報URL格納
56 | setNextMapTypeUrl(state, nextMapTypeUrl) {
57 | state.nextMapTypeUrl = nextMapTypeUrl;
58 | },
59 | // レイヤ切り替え後のレイヤ順情報URL格納
60 | setSelectMapTypeUrl(state, selectMapTypeUrl) {
61 | state.selectMapTypeUrl = selectMapTypeUrl;
62 | },
63 | // ペイン配置情報更新
64 | setMapTypeJson(state, select) {
65 | for (const v of state.mapTypeJson) {
66 | try {
67 | v.data[0].mapList[select.index].mapType = select.selected;
68 | } catch (e) {
69 | continue;
70 | }
71 | }
72 | },
73 | // URL貼り付け時ペイン配置情報更新
74 | pastingMapTypeJson(state, mapTypeList) {
75 | for (let index = 0; index < mapTypeList.length; index++) {
76 | for (const v of state.mapTypeJson) {
77 | try {
78 | v.data[0].mapList[index].mapType = mapTypeList[index];
79 | } catch (e) {
80 | continue;
81 | }
82 | }
83 | }
84 | },
85 | // MapFanAPIキー格納
86 | getMapFanApiKey(state, mapFanApiKey) {
87 | state.mapFanApiKey = mapFanApiKey;
88 | },
89 | },
90 | actions: {
91 | // 各情報をstateに格納
92 | getInfo(context, info) {
93 | // 現在のレイヤ順情報URL作成
94 | let nowMapTypeUrl = info.mapTypeList.join('/');
95 | // URLを動的に変更
96 | let url = '/' + [info.id, info.zoom, info.lat, info.lng, nowMapTypeUrl].join('/');
97 | history.replaceState('', '', url);
98 | // ペイン・ズーム・緯度・経度格納
99 | context.commit('setLocationInfo', info);
100 | // 現在のレイヤ順情報URL格納
101 | context.commit('setNowMapTypeUrl', nowMapTypeUrl);
102 | },
103 | // 画面遷移後のレイヤ順情報URLをstateに格納
104 | getNextMapTypeUrl(context, id) {
105 | // 画面遷移後のレイヤ順情報取得
106 | let nextMapList = [];
107 | for (const v of this.state.mapTypeJson) {
108 | if (v.id === Number(id)) {
109 | for (let i = 0; i < this.state.mapTypeList.length; i++) {
110 | try {
111 | nextMapList.push(v.data[0].mapList[i].mapType);
112 | } catch (e) {
113 | continue;
114 | }
115 | }
116 | }
117 | }
118 | // 画面遷移後のレイヤ順情報URL生成
119 | let nextMapTypeUrl;
120 | if (nextMapList.length === 1) {
121 | nextMapTypeUrl = nextMapList[0];
122 | } else {
123 | nextMapTypeUrl = nextMapList.join('/');
124 | }
125 | // 画面遷移後のレイヤ順情報URLを格納
126 | context.commit('setNextMapTypeUrl', nextMapTypeUrl);
127 | },
128 | // MapFan認証キー取得
129 | async getMapFanApiKeyAction(context, mapFanAuthKey) {
130 | // https://api-auth-pre.mapfan.com/v1/auth?appid=APIキー&date=20171101102029
131 | const mapFanAuthUrl =
132 | 'https://api-auth-pre.mapfan.com/v1/auth?appid=' +
133 | mapFanAuthKey +
134 | '&date=20171101102029';
135 | let mapFanApiKey;
136 | await axios
137 | .get(mapFanAuthUrl, {
138 | adapter: axiosJsonpAdapter,
139 | })
140 | .then(res => {
141 | mapFanApiKey = res.data.key;
142 | });
143 | // MapFanAPIキー格納
144 | context.commit('getMapFanApiKey', mapFanApiKey);
145 | },
146 | },
147 | });
148 |
--------------------------------------------------------------------------------
/src/views/Help.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | This web site is
10 |
11 |
12 |
13 | Japan Map Compare: mapcompare.jp
14 |
15 | Japan Map Compare can compare the various webmaps focusing on Japan area
16 | including OpenStreetMap, Bing, Google, ESRI, Mapfan and GSI Map. It is
17 | inspired by
18 | Map Compare
21 | coded by Geofabrik and BBBike (Thanks a lot!!) and is developed using modern
22 | webmapping technologies like Leaflet, Vue.js...
23 |
24 |
25 | You can use permalink to save the current status of showing page as below
26 | example.
27 |
28 |
29 | https://mapcompare.jp/3{number of panels}/14{zoom
30 | level}/35.6795{lat}/139.7672{lon}/tPale{webmap_1}/osm{webmap_2}/tOrt{webmap_3}
31 |
32 |
33 | Comparison with Bing Maps, Google Maps, Mapfan is for informational purposes
34 | only. Do not use information from these webmaps to edit OpenStreetMap data.
35 |
36 |
37 |
38 |
39 | Comparable webmaps {webmap}:
40 |
41 |
42 |
43 |
44 | developed by:
45 |
46 | JSPS Scientific Research (B) (Generative Research Fields) Project: Trusts of
47 | Crowdsourced Geographic Information
48 |
49 | mapcomparejp@gmail.com
50 |
54 |
55 |
56 |
57 |
58 |
59 | developed by:
60 | MIERUNE Inc.
61 |
62 |
63 |
64 |
65 |
66 |
67 | License:
68 |
69 | All maps except GSI Maps(地理院地図)/Bing/Google/ESRI/Mapfan based on OSM
70 | data © OpenStreetMap (License: ODbL 1.0), OSM Tiles licensed CC-BY-SA 2.0
71 |
72 |
73 | The source code of Japan Map Compare is licensed under The
74 | 2-Clause BSD License
77 |
78 |
79 |
80 |
81 | GitHub:
82 |
83 | mapcomparejp/JapanMapCompare
88 |
89 |
90 |
91 |
92 | Supported browsers:
93 | Google Chrome (Latest edition)
94 | Firefox (Latest edition)
95 |
96 |
97 |
98 |
99 |
100 |
101 |
189 |
190 |
198 |
--------------------------------------------------------------------------------
/src/views/Pane.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/src/views/View404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | No Page
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
29 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | productionSourceMap: false,
3 | };
4 |
--------------------------------------------------------------------------------