title: Google Maps: Polygon and Marker Z-Index
body: <p>I have a Google Map with many markers (yellow circles), and I implemented a tool to draw polygons over the markers. However, the polygon is behind the markers while drawing (and stays behind when complete).</p>
  
  <p><img src="https://i.stack.imgur.com/QAhTS.png" alt="Active polygon drawing tool beneath the markers."></p>
  
  <p>I tried changing the ZIndex in both markers and polygons, but it seems to alter the way in which markers are shown with respect to other markers, and not with respect to polygons. I also tried </p>
  
  <pre><code>polygon.setZIndex(google.maps.Marker.MAX_ZINDEX + 1);
  </code></pre>
  
  <p>How can I bring the polygon to the front?</p>