fix for #191 - graceful dealing with setCenter() on lonlat out of maxexteng (on first setcenter() call). added test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1585 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -576,6 +576,11 @@ OpenLayers.Map.prototype = {
|
||||
* trigger movestart/end events
|
||||
*/
|
||||
setCenter: function (lonlat, zoom, dragging) {
|
||||
|
||||
if (!this.center && !this.isValidLonLat(lonlat)) {
|
||||
lonlat = this.maxExtent.getCenterLonLat();
|
||||
}
|
||||
|
||||
var zoomChanged = (this.isValidZoomLevel(zoom)) &&
|
||||
(zoom != this.getZoom());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user