[Commits] r366 - in apps/opengeo/geoexplorer/trunk: lib theme
commits at geoext.org
commits at geoext.org
Wed Apr 8 01:42:37 CEST 2009
Author: tschaub
Date: 2009-04-08 01:42:37 +0200 (Wed, 08 Apr 2009)
New Revision: 366
Modified:
apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css
Log:
Adding navigation history controls.
Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-04-07 23:33:51 UTC (rev 365)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-04-07 23:42:37 UTC (rev 366)
@@ -252,11 +252,14 @@
initMapControlsAndToolbar: function() {
-
// create a navigation control
var navControl = new OpenLayers.Control.Navigation();
this.map.addControl(navControl);
+ // create a navigation history control
+ var historyControl = new OpenLayers.Control.NavigationHistory();
+ this.map.addControl(historyControl);
+
var mapControls = {
getFeatureInfo: new OpenLayers.Control.WMSGetFeatureInfo(this.initialConfig.ows, {
queryVisible: true
@@ -338,6 +341,20 @@
scope: this
}),
new Ext.Button({
+ tooltip: "Zoom to Previous Extent",
+ iconCls: "icon-zoom-previous",
+ handler: function() {
+ historyControl.previous.trigger();
+ }
+ }),
+ new Ext.Button({
+ tooltip: "Zoom to Next Extent",
+ iconCls: "icon-zoom-next",
+ handler: function() {
+ historyControl.next.trigger();
+ }
+ }),
+ new Ext.Button({
tooltip: "Zoom to Visible Extent",
iconCls: "icon-zoom-visible",
handler: function() {
Modified: apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css
===================================================================
--- apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css 2009-04-07 23:33:51 UTC (rev 365)
+++ apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css 2009-04-07 23:42:37 UTC (rev 366)
@@ -22,6 +22,14 @@
background-image: url(img/silk/magnifier_zoom_out.png) !important;
}
+.icon-zoom-previous {
+ background-image: url(img/silk/arrow_left.png) !important;
+}
+
+.icon-zoom-next {
+ background-image: url(img/silk/arrow_right.png) !important;
+}
+
.icon-zoom-visible {
background-image: url(img/silk/arrow_out.png) !important;
}
More information about the Commits
mailing list