Skip to content

Instantly share code, notes, and snippets.

@maplinkapi
Created April 30, 2013 19:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maplinkapi/5491129 to your computer and use it in GitHub Desktop.
Save maplinkapi/5491129 to your computer and use it in GitHub Desktop.
function setZoomCenter() {
function fitBoundsArray(points) {
var z = map.getZoomForPoints(points);
var b = LBS.Bounds.fromArray(points);
map.setZoom(z);
map.setCenter(b.getCenter());
};
fitBoundsArray(points);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment