opening josm will only load the current view if you are close enough,

opening josm will no longer trigger a constant loading symbol in
browsers
This commit is contained in:
DennisSchiefer
2012-04-25 15:01:20 +01:00
parent 94ca30c690
commit 369edbe9a7
2 changed files with 23 additions and 9 deletions
+8
View File
@@ -43,6 +43,14 @@ OSRM.MapView = L.Map.extend({
bounds.extend( this.unproject(ne_point,zoom) );
this.fitBounds( bounds );
},
getBoundsUI: function(unbounded) {
var bounds = this.getPixelBounds();
if( OSRM.GUI.visible == true )
bounds.min.x+=OSRM.GUI.width;
var sw = this.unproject(new L.Point(bounds.min.x, bounds.max.y), this._zoom, true),
ne = this.unproject(new L.Point(bounds.max.x, bounds.min.y), this._zoom, true);
return new L.LatLngBounds(sw, ne);
},
getCenterUI: function(unbounded) {
var viewHalf = this.getSize();
if( OSRM.GUI.visible == true )