title: Google Maps version 3
body: <p>What's the replacement of getVertexCount() in v3 of google maps? Please let me know. I am using the same in my code for v3, but it doesn't seem to be working. Is there any replacement for getVertexCount() in v3 or there's no mandatory replacement? Please let me know the replacement function if there is. I am providing the initialize() function of my version2 code. Please suggest. Following is the initialize function of my version 2 code :     </p>
  
  <pre><code>function initialize() {
              if (GBrowserIsCompatible()) {
  
                  // Initialize geocoder for address search
                  geocoder = new GClientGeocoder();
  
                  // Draw the map
                  var startPoint = parseCoordinate(VALUE_SITE_COORDINATE);
                  map = new GMap2(document.getElementById(ID_DIV_MAP_CANVAS));
                  map.setCenter(startPoint, 13);
                  map.setUIToDefault();
  
                  // Listener for map mouse move event showing pointer coordinates
                  GEvent.addListener(map, 'mousemove', function(latlng) {
                      document.getElementById(ID_INPUT_CURRENT_COORDINATE).value = latlng;
                  });
  
                  // Draw the main polygon
                  var coordinates = parseCoordinates(VALUE_COORDINATES);
                  if( coordinates.length  &gt; 0)
                  {
                      polygon = createPolygonOnInit(coordinates);
                      map.addOverlay(polygon);
                      if (polygon.getVertexCount() == MAX_VERTICES_RECTANGLE) {
                          createBackgroundPolygon();
                      }
  
                      adjustMapAppearance(map);
                  }
  
  
                  // Render polygon coordinates
                  showCoordinates(coordinates);
  
                  // Create our "tiny" marker icon
                  var blueIcon = new GIcon(G_DEFAULT_ICON);
                  blueIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png";
  
                  // Set up our GMarkerOptions object
                  markerOptions = { icon:blueIcon };
                  map.addOverlay(new GMarker(startPoint, markerOptions));
  
                  // Set initial state
                  if (coordinates.length == 0) {
                      setState(STATE_NO_GEO_FENCE);
                  } else {
                      setState(STATE_READ_GEO_FENCE);
                      prevstate = STATE_READ_GEO_FENCE;
                  }
              }
          }
  </code></pre>