指定点的缩放层次为10

This commit is contained in:
wlx 2010-06-29 12:56:30 +00:00
parent 988d180fdc
commit 91b350d05f
1 changed files with 3 additions and 0 deletions

View File

@ -253,6 +253,9 @@ function reportError(request)
var plotbounds=new GLatLngBounds(new GLatLng(<?= $md->south; ?>,<?= $md->west; ?>),new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>));
var zoomlevel=map.getBoundsZoomLevel(plotbounds);
zoomlevel--;
<?php if ($md->north==$md->south) : ?>
zoomlevel=10;
<?php endif; ?>
if (zoomlevel>16) zoomlevel=16;
map.setCenter(new GLatLng(<?= ($md->south+$md->north)/2; ?>,<?= ($md->east+$md->west)/2; ?>), zoomlevel);
map.setMapType(G_SATELLITE_MAP);