多段线使用我的Google地图时发生的事件,转弯角度不是0deg

时间:2019-06-21 08:42:43

标签: google-maps google-maps-markers polyline

每当lineSymbol旋转deg时,我都会尝试触发一个事件。

var lineSymbol = {
            path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
            scale: 4,
            strokeColor: '#393'
        };
        //this is for getting line.


        let line = new google.maps.Polyline({
            geodesic: true,
            path: lat_lng,
            zoom: true,
            strokeColor: '#FF0000',
            strokeOpacity: 1.0,
            strokeWeight: 2,
            icons: [{
                icon: lineSymbol,
                offset: '80%',
                rotation: 90,
                anchor: new google.maps.Point(0, 200)
            }],
            map: map
        });
    line.setPath(lat_lng);

0 个答案:

没有答案