我有兩個多邊形:big
和small
- 小的一個包含在大的內部。Google Maps V3 API如何管理多邊形的Z-Index?
無論我執行:
//show big, then small...
big.setMap(null);
big.setMap(map);
small.setMap(null);
small.setMap(map);
還是我執行:
//show small, then big...
small.setMap(null);
small.setMap(map);
big.setMap(null);
big.setMap(map);
我總是在最上層的大多邊形結束。這意味着,我無法在小多邊形上接收鼠標事件,因爲它被大多邊形隱藏。
Google Maps V3 API如何管理多邊形的Z-Index?我想我將不得不在一個更大的多邊形上鑽一個洞,讓較小的一個穿過......但我寧願不要有一個更優雅的解決方案。
我知道有比鑽孔更好的解決方案 - 謝謝! – 2013-04-29 19:44:42