0

DBから緯度/経度を取得しています。2 つの距離の間に線を引くことができません。これが私のコードです

var auto_refresh = setInterval(
function () {
    $.get('http://developer.allsecure.me/Location/longlat', function (data) {
        map_canvas.setCenter(new google.maps.LatLng(data.startlat, data.startlong));

        clearMarkers();

        setMarker(map_canvas, 'center', new google.maps.LatLng(data.startlat, data.startlong), '', '/img/device.png', '', '', true);

        var line = new google.maps.Polyline({
            path: [new google.maps.LatLng(data.startlat, data.startlong), new google.maps.LatLng(data.endlat, data.endlong)],
            strokeColor: "#FF0000",
            strokeOpacity: 1.0,
            strokeWeight: 10,
            map: map
        });
    }, 'json');

}, 1000);

2 つの距離の間にポリラインが追加されない理由がわかりません。

4

1 に答える 1