简体   繁体   中英

Center mark on google maps api v3

I would like to add a center mark on the google maps api v3. This would be a mark with low opacity that is constantly in the center of the map. Here is my dilemma.

  1. I cannot add it in an absolutely positioned div or image, with high z-index, outside of the map div because it would prevent clicking markers in the map div.

  2. I cannot add it as a marker because it would would move with the map. I do not want to reposition it with the dragend event because it would still move during the drag.

  3. I don't believe I can use an overlay because this would always move with the map. I could be wrong on this one.

You could do one of these:

  • Reposition marker on bounds_changed event's handler
  • Reposition marker on center_changed event's handler

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM