The following call will give you the zoom level if you can provide it with an appropriate rectangular bounds object:
GMap2.getBoundsZoomLevel(bounds)
But how to calculate the bounds?
You can manually annotate each source record with a rectangle determined "by eye" using a map and have someone type in values.
Ideally you want data, and luckily there is shed loads of data on DBPedia.
My geometry and algebra is a little rusty, but with a little of both I'm sure you can calculate a rectangle given the area of the location you want to view. (Maybe start with the square root if assuming a square city, or rearrange πr2 if assuming a circular one)
Try out this query to extract the areas of regions.
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpedia2: <http://dbpedia.org/property/>
SELECT ?url, ?label, ?lat, ?long, ?area WHERE {
?url geo:lat ?lat .
?url geo:lat ?long .
?url rdfs:label ?label . FILTER ( lang(?label) = 'en' ) .
?url dbpedia2:area ?area . FILTER ( datatype(?area) = xsd:double )
} LIMIT 10
You'll need to cache the results or load them into a faster more local datasource as DBPedia is searching millions of triples of unstructured data (well RDF data). You can download the Titles, Infobox and coordinates data sets from DBPedia and load them into e.g. Jena. Remember to turn off all the validation options during loading :-)
You can also access this data using a RESTful API which has fairly usable Web form, and its possible to pull the URL its generating using "Copy download link button" in the firefox downloads window, or setting the output format to HTML. It also generates XML and JSON.
Don't forget to add a margin for wobbly shaped cities...