From bcba6bb0fd828cbe1c2a46bd47d3472c6954475b Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sat, 3 Mar 2012 17:06:14 +0000 Subject: [PATCH] Map: make options.center compatible with permalink --- lib/OpenLayers/Map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 96744b4dd2..016c4110b8 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -628,9 +628,9 @@ OpenLayers.Map = OpenLayers.Class({ * be properly set below. */ delete this.center; - this.addLayers(options.layers); + 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); }