Map: make options.center compatible with permalink

This commit is contained in:
Peter Robins
2012-03-03 17:06:14 +00:00
parent 66e8fafdf2
commit bcba6bb0fd

View File

@@ -630,7 +630,7 @@ OpenLayers.Map = OpenLayers.Class({
delete this.center;
this.addLayers(options.layers);
// set center (and optionally zoom)
if (options.center) {
if (options.center && !this.getCenter()) {
// zoom can be undefined here
this.setCenter(options.center, options.zoom);
}