1
我有兩個多邊形(P1和P2)的座標在谷歌地圖上創建它。當P2位於P1時如何從P1切斷P2? 例如http://quality.iro38.ru/CI/question_about_map.php如何從谷歌地圖API中的多邊形區域除外
這是我的js:
var triangleCoords = [
new google.maps.LatLng(25.774252, -80.190262),
new google.maps.LatLng(18.466465, -66.118292),
new google.maps.LatLng(32.321384, -64.75737),
new google.maps.LatLng(25.774252, -80.190262)
];
var triangleCoords1 = [
new google.maps.LatLng(29,-69),
new google.maps.LatLng(23,-72),
new google.maps.LatLng(25,-70),
new google.maps.LatLng(29,-69)
];
bermudaTriangle = new google.maps.Polygon({
paths: [triangleCoords, triangleCoords1],
strokeColor: '#FF0000',
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: '#FF0000',
fillOpacity: 0.35
});
bermudaTriangle.setMap(map);