Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ベースレイヤーの変更 #289

Closed
halsk opened this issue Feb 16, 2020 · 5 comments · Fixed by #368
Closed

ベースレイヤーの変更 #289

halsk opened this issue Feb 16, 2020 · 5 comments · Fixed by #368

Comments

@halsk
Copy link
Member

halsk commented Feb 16, 2020

まずはベースレイヤーを、ベクタータイルに切り替える

#288 のサブIssue

@halsk halsk added this to the Vector Tile Support milestone Feb 16, 2020
@NEKOYASAN
Copy link
Collaborator

このissue取り組んでる方いなければやります

@smellman
Copy link
Contributor

対応できるか確認しているのですが、zoom changeのタイミングでスタイルがぶっ壊れるというのが確認されています。

@NEKOYASAN
Copy link
Collaborator

なるほど...こっちでも試してみますね

@smellman
Copy link
Contributor

diff --git a/components/PrintableMap.vue b/components/PrintableMap.vue
index 1640d84..6ac3a45 100644
--- a/components/PrintableMap.vue
+++ b/components/PrintableMap.vue
@@ -110,24 +110,7 @@ export default {
       isOpenAreaSelect: false,
       isOpenList: false,
       isDisplayAllCategory: true,
-      mapStyle: {
-        'version': 8,
-        'sources': {
-          'OSM': {
-            'type': 'raster',
-            'tiles': [this.$i18n.t("PrintableMap.map_url")],
-            'tileSize': 256,
-            'attribution': 'Map data © <a href="http://openstreetmap.org/">OpenStreetMap</a>'
-          }
-        },
-        'layers': [{
-          'id': 'OSM',
-          'type': 'raster',
-          'source': 'OSM',
-          'minzoom': 0,
-          'maxzoom': 22
-        }]
-      },
+      mapStyle: "https://tile.openstreetmap.jp/styles/maptiler-basic-ja/style.json",
       imageLegendMark: {
         ja: imageLegendMarkJa,
         en: imageLegendMarkEn

ベクタータイルには特に指定はないですが、現在使っているものの元ネタを直接参照してもらえれば。
ちなみに、リロードするときに強制リロードしないとスタイルがぶっ壊れたままになります(強制リロードしてもぶっ壊れるのですが...)

smellman added a commit to smellman/mapprint that referenced this issue Feb 27, 2021
@smellman smellman mentioned this issue Feb 27, 2021
@smellman
Copy link
Contributor

対応してプルリク投げました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants