Skip to content

Commit

Permalink
fix: coordinates order, closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamura196 committed Jul 3, 2024
1 parent a095e1d commit 7dc4bc2
Show file tree
Hide file tree
Showing 3 changed files with 549 additions and 539 deletions.
10 changes: 6 additions & 4 deletions components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ let markers: any[] = [];
const map = ref<Map | null>(null);
/*
const setMap = (leafletMapObject: Map) => {
map.value = leafletMapObject;
};
*/
// Leaflet マップの準備ができた際の処理
const onLeafletReady = (map: L.Map) => {
Expand Down Expand Up @@ -111,7 +113,7 @@ const display = () => {
for (const feature of features) {
const coordinates = feature.geometry.coordinates;
const marker = L.marker(coordinates);
const marker = L.marker([coordinates[1], coordinates[0]]);
// @ts-ignore
marker.id = feature.id;
Expand All @@ -125,8 +127,8 @@ const display = () => {
};
});
x += coordinates[0];
y += coordinates[1];
x += coordinates[1];
y += coordinates[0];
const popup = L.popup();
marker.bindPopup(popup);
Expand Down Expand Up @@ -185,7 +187,7 @@ watch(
const coordinates = feature.geometry.coordinates;
center_.value = coordinates;
center_.value = [coordinates[1], coordinates[0]];
for (const marker of markers) {
let iconUrl =
Expand Down
108 changes: 54 additions & 54 deletions public/canvas.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7151233,
139.7623182
139.7623182,
35.7151233
]
}
},
Expand All @@ -86,8 +86,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7129321,
139.7612649
139.7612649,
35.7129321
]
}
},
Expand All @@ -102,8 +102,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7109037,
139.7622949
139.7622949,
35.7109037
]
}
},
Expand All @@ -118,8 +118,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7097492,
139.7618816
139.7618816,
35.7097492
]
}
},
Expand All @@ -134,8 +134,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7143244,
139.7618343
139.7618343,
35.7143244
]
}
},
Expand All @@ -150,8 +150,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7123118,
139.764372
139.764372,
35.7123118
]
}
},
Expand All @@ -166,8 +166,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7135689,
139.7645652
139.7645652,
35.7135689
]
}
},
Expand All @@ -182,8 +182,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7166753,
139.7594158
139.7594158,
35.7166753
]
}
},
Expand All @@ -198,8 +198,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7134203,
139.76062
139.76062,
35.7134203
]
}
},
Expand All @@ -214,8 +214,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7121183,
139.7627108
139.7627108,
35.7121183
]
}
},
Expand All @@ -230,8 +230,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7126873,
139.7607901
139.7607901,
35.7126873
]
}
},
Expand All @@ -246,8 +246,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7081704,
139.7620234
139.7620234,
35.7081704
]
}
},
Expand All @@ -262,8 +262,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7184833,
139.7608678
139.7608678,
35.7184833
]
}
},
Expand All @@ -278,8 +278,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7122089,
139.7620034
139.7620034,
35.7122089
]
}
},
Expand All @@ -294,8 +294,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7151585,
139.7593041
139.7593041,
35.7151585
]
}
},
Expand All @@ -310,8 +310,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7102509,
139.7642327
139.7642327,
35.7102509
]
}
},
Expand All @@ -326,8 +326,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7111428,
139.7605725
139.7605725,
35.7111428
]
}
},
Expand All @@ -342,8 +342,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7165095,
139.7606565
139.7606565,
35.7165095
]
}
},
Expand All @@ -358,8 +358,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7126024,
139.7602447
139.7602447,
35.7126024
]
}
},
Expand All @@ -374,8 +374,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7159457,
139.759576
139.759576,
35.7159457
]
}
},
Expand All @@ -390,8 +390,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7144106,
139.7600401
139.7600401,
35.7144106
]
}
},
Expand All @@ -406,8 +406,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7134381,
139.762299
139.762299,
35.7134381
]
}
},
Expand All @@ -422,8 +422,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7133129,
139.7600601
139.7600601,
35.7133129
]
}
},
Expand All @@ -438,8 +438,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7150937,
139.7616346
139.7616346,
35.7150937
]
}
},
Expand All @@ -454,8 +454,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7143713,
139.7625263
139.7625263,
35.7143713
]
}
},
Expand All @@ -470,8 +470,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7116287,
139.7607835
139.7607835,
35.7116287
]
}
},
Expand All @@ -486,8 +486,8 @@
"geometry": {
"type": "Point",
"coordinates": [
35.7096128,
139.7611825
139.7611825,
35.7096128
]
}
}
Expand Down
Loading

0 comments on commit 7dc4bc2

Please sign in to comment.