Allow center to be provided to map constructor without layers. r=bartvde (closes #2561)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -594,13 +594,12 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
// add any initial layers
|
||||
if (options && options.layers) {
|
||||
this.addLayers(options.layers);
|
||||
}
|
||||
|
||||
// set center (and optionally zoom)
|
||||
if (options && options.center) {
|
||||
// zoom can be undefined here
|
||||
this.setCenter(options.center, options.zoom);
|
||||
this.addLayers(options.layers);
|
||||
// set center (and optionally zoom)
|
||||
if (options.center) {
|
||||
// zoom can be undefined here
|
||||
this.setCenter(options.center, options.zoom);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user