[英]How do I disable alpha combining of intersecting circles/polygons in Google Maps v3 API?
Google Maps v3 JS API中是否有method / config屬性來禁用/解決重疊圓圈的alpha合並問題? 我目前正在從事一個項目,該項目最終可能會在地圖上繪制許多圓圈,其中某些區域的交點大於10。 即使不透明度非常低,這也會很快使這些相交區域中的地圖不可讀。 關於如何使交點與任何單個圓保持相同的不透明度的任何建議將不勝感激-顯然,這是API v2中的默認行為(示例屏幕截圖: http : //img23.imageshack.us/i/screenshot20110504at655.png / )
所以2年后,我遇到了同樣的問題。 此解決方案有點麻煩。
在JavaScript中將所有圈子的不透明度設置為1。 然后添加此CSS:
#map-canvas > div:first-of-type > div:first-of-type > div:first-of-type > div:first-of-type > div:first-of-type > div:first-of-type > div:first-of-type {
opacity:0.3
}
如果Google更改了圓形圖層的位置,則將中斷。
PS。 我正在使用Maps API的v3。
基於Daryls的答案,您必須將其放入html標頭的樣式部分:
.gm-style > div:nth-child(1) > div:nth-child(1) > div:nth-child(2){
opacity: 0.1;
}
截至2018年7月,這為我工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.