metadataview中恢复fitBounds
This commit is contained in:
parent
cd4d644c1b
commit
65c07e543e
|
@ -260,7 +260,6 @@ function initialize() {
|
|||
function setRectangle(east,west,south,north){
|
||||
|
||||
if(east.toFixed(1) != west.toFixed(1) && south.toFixed(1)!= north.toFixed(1) ){
|
||||
RemoveRectangle();
|
||||
|
||||
bounds = new google.maps.LatLngBounds(
|
||||
new google.maps.LatLng(south,west),
|
||||
|
@ -273,8 +272,8 @@ function setRectangle(east,west,south,north){
|
|||
});
|
||||
|
||||
rectangle.setMap(map);
|
||||
|
||||
}else{
|
||||
RemoveRectangle();
|
||||
|
||||
var position = new google.maps.LatLng(south,east);
|
||||
|
||||
|
@ -285,5 +284,9 @@ function setRectangle(east,west,south,north){
|
|||
|
||||
markers.push(marker);
|
||||
}
|
||||
|
||||
|
||||
var bounds = new google.maps.LatLngBounds();
|
||||
bounds.extend(new google.maps.LatLng(south,west));
|
||||
bounds.extend(new google.maps.LatLng(north,east));
|
||||
map.fitBounds(bounds);
|
||||
}
|
Loading…
Reference in New Issue