[Mapbender-commits] r8813 - trunk/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed May 7 00:34:42 PDT 2014
Author: hwbllmnn
Date: 2014-05-07 00:34:42 -0700 (Wed, 07 May 2014)
New Revision: 8813
Modified:
trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
Log:
prevent zoom when loaded via wmc
Modified: trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
===================================================================
--- trunk/mapbender/lib/mb.ui.displayKmlFeatures.js 2014-05-07 07:33:52 UTC (rev 8812)
+++ trunk/mapbender/lib/mb.ui.displayKmlFeatures.js 2014-05-07 07:34:42 UTC (rev 8813)
@@ -211,6 +211,15 @@
self.element.trigger('kml:error',"Problem talking to server: " + errorThrown);
}
});
+ var kmls = mb_getWmcExtensionData('KMLS');
+ if(kmls) {
+ kmls = JSON.parse(kmls);
+ this._kmls = kmls;
+ for(var k in kmls) {
+ kmls[k].loadedOnStartup = true;
+ self.element.trigger('kml:loaded',kmls[k]);
+ }
+ }
},
@@ -315,10 +324,12 @@
}
}
});
- //set new bbox for mapframe
+ // set new bbox for mapframe
+ if(!mapitem.loadedOnStartup) {
$map.calculateExtent(
new Mapbender.Extent(bbox[0], bbox[1])
);
+ }
$map.setMapRequest();
}
More information about the Mapbender_commits
mailing list