Googleマップで経度緯度をウェイポイントとして使用しようとしていますが、機能していないようです。
これが私の価値観をプッシュする方法です
waypts_mtlsheloc.push({
location: (45.658197,-73.636333), //I don't think I'm supposed to write this like that. But can't find the right way.
stopover: true
})
そして、このように私の行を変更してみてください
service.route({
origin: latlng_mtlsheloc[0],
destination: latlng_mtlsheloc[latlng_mtlsheloc.length - 1],
waypoints:waypts_mtlsheloc,
travelMode: google.maps.DirectionsTravelMode.DRIVING
}, function(result, status) {
console.log(status)
if (status == google.maps.DirectionsStatus.OK) {
path = path.concat(result.routes[0].overview_path);
line_mtlsheloc.setPath(result.routes[0].overview_path);
}
});
しかし、「プロパティ[ウェイポイント]のエラー」というエラーが表示されます。場所を書き留めるさまざまな方法を試しましたが、正しい方法が見つからないようです。