Changeset 12706 for extensions/rv_gmaps/trunk/template/data_loader.js
- Timestamp:
- Dec 8, 2011, 10:36:35 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_gmaps/trunk/template/data_loader.js
r12701 r12706 77 77 var bounds = new google.maps.LatLngBounds( this._map.getBounds().getSouthWest(), this._map.getBounds().getNorthEast() ); 78 78 79 // bug as of v 3.7 -79 //BEGIN BUG in maps api as of v3.7 - when map wraps horizontally more than 360 deg - the getBounds is wrong 80 80 var isOver = false; 81 81 if (bounds.getSouthWest().lng() < bounds.getNorthEast().lng()) … … 90 90 isOver = true; 91 91 } 92 if (!isOver) 93 {//very emprical tests 94 if (this._map.getDiv().offsetWidth / this._map.getDiv().offsetHeight > 1.3 95 && this._map.getZoom()<3 96 && bounds.getSouthWest().lat() < -50 97 && bounds.getNorthEast().lat() > 50) 98 { 99 isOver = true; 100 } 101 } 92 102 93 103 if (isOver) 94 104 bounds = new google.maps.LatLngBounds( new google.maps.LatLng(this._map.getBounds().getSouthWest().lat(),-179.9), new google.maps.LatLng(this._map.getBounds().getNorthEast().lat(), 179.9) ); 95 // endbug105 //END bug 96 106 97 107 … … 117 127 /*if ( !bounds.isFullLat() )*/ 118 128 { 119 nd = latRange* 12/100;120 sd = latRange* 4/100;129 nd = latRange*0.12; 130 sd = latRange*0.04; 121 131 } 122 132 /*if ( !bounds.isFullLng() )*/ 123 133 { 124 ed = lonRange* 9/100;125 wd = lonRange* 7/100;134 ed = lonRange*0.09; 135 wd = lonRange*0.07; 126 136 } 127 137 var digits = Math.max( getLatLonDigits(latRange,4,2), getLatLonDigits(lonRange,4,2) );
Note: See TracChangeset
for help on using the changeset viewer.