You can use the center(x, y, scale, time)
method to center and zoom on a specific 2D coordinate on the map.
This example demonstrates how to zoom in on points clustered around specific labels. The algorithm works as follows:
x, y coordinates of the label by searching the input array of points.
cluster() method.
x and y parameters of
center(). Compute zoom scale as the
ratio of the dimensions of the bounding box of all points and the bounding box of the points in cluster.
Click the links below to zoom to a number of example labels. Press Esc to Reset zoom.
Zoom to: pertussis measles vaccine hepatitis B tuberculin malaria rotavirus AIDS vaccine rubella
All code for this custom zooming functionality is included directly in this HTML page. View the page source to examine the code.