当我缩小时,svg图标不会停留在折线上

时间:2018-05-01 15:02:07

标签: google-maps

当我放大时,我的svg图标不会保留在折线上:任何人都可以指出问题。我一直在玩原点和锚没有成功。谢谢!

pinMarker:function(color){
    return {
        path:  "M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z",
        fillColor: color,
        fillOpacity: 1,
        strokeColor: '#000',
        strokeWeight: 2,
        scale: 1,
        anchor: new google.maps.Point(0,-5),
        rotation: 0
    };
}



var pinMarker = this.pinMarker(teamColors[i]);
var distanceKm=teamDistance[i]/1312;
var point = this.moveAlongPath(this.routePoints, distanceKm);
this.flagPoints.push(point);
teamMarker = new google.maps.Marker({
    id:teamName[i],
    position: point,
    map:this.map,
    icon:pinMarker,
    zIndex:(teamName[i] == currentTeamName)? 60000 : 50000
});

0 个答案:

没有答案