Webcognoscere

Zooming in on a set of Google Markers

Author: Miguel Posted 13. May 2010

function ZoomInOnMarkers(markers) {
    var bounds = new GLatLngBounds;
    for (var i = 0; i < markers.length; i++) {
        bounds.extend(markers[i].point);
    }
    m_GRMap.setZoom(m_GRMap.getBoundsZoomLevel(bounds));
    m_GRMap.setCenter(bounds.getCenter()); 
}

Tags:

Global ASP.NET Hosting Leader - Click Here

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Global ASP.NET Hosting Leader - Click Here