0
創建帶有一系列符號的折線, 好像有些html「畫布」重複顯示, 並顯示在地圖上的錯誤位置。谷歌地圖API v3 - 帶錯誤地點複製的折線 - google chrome
這個錯誤發生在「google chrome」上。
附上截圖。 還附加了js-fiddle的鏈接。
link to js-fiddle - please view on google chrome
function initialize() {
var gm = google.maps,
mapOptions = {
zoom: 17,
center: new gm.LatLng(55.685336941597804, 21.11585641885563),
mapTypeId: gm.MapTypeId.ROADMAP
},
map = new gm.Map(document.getElementById('map_canvas'), mapOptions),
points = [
//new gm.LatLng(55.685025, 21.11899500000004),
new gm.LatLng(55.683228369431774, 21.11899500000004),
new gm.LatLng(55.68333671468528, 21.117905037957826),
new gm.LatLng(55.68364868408562, 21.116946525082994),
new gm.LatLng(55.68412665376389, 21.116235063478825),
new gm.LatLng(55.6847129783503, 21.11585646893286),
new gm.LatLng(55.685336941597804, 21.11585641885563),
new gm.LatLng(55.6859232843305, 21.116234936678893),
new gm.LatLng(55.685025, 21.11899500000004)
],
iconSequence = {
icon: {
path: gm.SymbolPath.FORWARD_CLOSED_ARROW
},
repeat: '12px',
},
line = new gm.Polyline({
map: map,
path: points,
icons: [iconSequence]
});
}
google.maps.event.addDomListener(window, 'load', initialize);
前段時間Google問題跟蹤器報告了這個問題:https://issuetracker.google.com/issues/38211242 – xomena