Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 Google Maps Mashup,并希望增加其中一个标记的 z-index,以便某些缩小的人可以看到它。
http://startupsradar.com/
我希望红色标记始终显示在上方。
标记的默认 zIndex 是多少?
标记的 zIndex 值可以达到最大值 google.maps.Marker.MAX_ZINDEX。因此,如果您希望您的标记高于一切,请将 zIndex 设置为 (google.maps.Marker.MAX_ZINDEX + 1)。例如 marker.setZIndex(google.maps.Marker.MAX_ZINDEX + 1);