Skip to content

Commit

Permalink
Update demo.html
Browse files Browse the repository at this point in the history
マーカー位置修正
  • Loading branch information
yadorogi committed Jan 23, 2024
1 parent dbe5b42 commit a61f815
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

const map = new google.maps.Map(document.getElementById('map'), {
zoom: 8,
center: { lat: 35.6895, lng: 139.6917 }, // 東京を中心に地図を表示
center: { lat: 35.638591, lng: 139.746087 }, // 港区立芝浦を中心に地図を表示
});

directionsRenderer.setMap(map);

const locations = [
{ lat: 35.6895, lng: 139.6917 }, // 東京
{ lat: 35.4478, lng: 139.6425 }, // 神奈川
{ lat: 35.6078, lng: 140.1060 }, // 千葉
{ lat: 35.8617, lng: 139.6455 }, // 埼玉
{ lat: 36.3703, lng: 140.4714 }, // 茨城県水戸市
{ lat: 35.638591, lng: 139.746087 }, // 港区立芝浦
{ lat: 35.645012, lng: 139.728899 }, // 港区立三光
{ lat: 35.661488, lng: 139.738892 }, // 港区立麻布
{ lat: 35.657219, lng: 139.730392 }, // 港区立南山
{ lat: 35.666023, lng: 139.732208 }, // 港区立中之町
];

function calculateAndDisplayRoute() {
Expand All @@ -34,7 +34,7 @@
directionsService.route(
{
origin: locations[0],
destination: locations[0],
destination: locations[4],
waypoints: waypoints,
optimizeWaypoints: true,
travelMode: 'DRIVING',
Expand All @@ -43,7 +43,7 @@
if (status === 'OK') {
directionsRenderer.setDirections(response);
} else {
window.alert('Directions request failed due to ' + status);
window.alert( status + ' が原因でルート検索に失敗しました。');
}
}
);
Expand Down

0 comments on commit a61f815

Please sign in to comment.