[Commits] r2624 - in sandbox/mapgears/geoext.ux/ux/WMSBrowser: examples lib/GeoExt.ux
commits at geoext.org
commits at geoext.org
Fri Mar 18 17:10:54 CET 2011
Author: adube
Date: 2011-03-18 17:10:54 +0100 (Fri, 18 Mar 2011)
New Revision: 2624
Added:
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.js
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserProxy.php
sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/WMSBrowser.js
Removed:
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.html
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.js
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserWithStatusBar.html
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/proxy.php
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/store.js
sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/SingleFile.js
Modified:
sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.html
Log:
WMSBrowser - examples cleanup, SingleFile.js renamed WMSBrowser.js
Modified: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.html
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.html 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.html 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,71 +1,74 @@
-<html>
- <head>
- <title>WMSBrowser using a TreePanel and a Ext.ux.StatusBar (example)</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- ext version 3.1.0 -->
- <script type="text/javascript" src="../../../../ext/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="../../../../ext/ext-all.js"></script>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+ <title>WMSBrowser using a TreePanel and a Ext.ux.StatusBar (example)</title>
- <!-- ext version 3.1.0 debug -->
- <!--script type="text/javascript" src="../../../../ext/adapter/ext/ext-base-debug-w-comments.js"></script>
- <script type="text/javascript" src="../../../../ext/ext-all-debug.js"></script-->
+ <!-- Versions, Ext 3.1.0, GeoExt trunk, OpenLayers trunk -->
+ <link rel="stylesheet" type="text/css"
+ href="../../../../ext/resources/css/ext-all.css" />
+ <link rel="stylesheet" type="text/css"
+ href="../../../../ext/examples/shared/examples.css" />
+ <link rel="stylesheet" type="text/css"
+ href="../../../../ext/examples/ux/statusbar/css/statusbar.css" />
+ <link rel="stylesheet" type="text/css"
+ href="../resources/css/WMSBrowser.css" />
+ </head>
+ <body>
+ <h1>WMSBrowser using a TreePanel and a Ext.ux.StatusBar (example)</h1>
+ <p>
+ This widget allows remote WMS service layer browsing and adding to your
+ map. See <a href="WMSBrowser.js">WMSBrowser.js</a> for the source code.
+ </p>
+ <div id="content"></div>
+ <br />
+ <p>
+ You can select an url from the top list or enter one, then click
+ 'connect'. The list of available layers appear on the left. When one is
+ checked (selected), more info appear on the right and a small map shows a
+ preview of the data selected. If more than one layer is selected, only
+ the last one selected has its info shown, but all layers are merged in
+ the preview.
+ </p>
+ <p>
+ The name of the layer is automatically generated by a combinaison of the
+ selected layers, but it can also be manually set. Clicking the
+ 'Add layer' button add the combinaison of the selected layers as a single
+ OpenLayers.Layer.WMS layer object to your map.
+ </p>
+ <p>
+ Among its features, the widget offers srs and extent validation with your
+ map. The layer list on the left can either be a Tree (default) or a Grid.
+ If the StatusBar ux widget (in Ext) source code is loaded, one is
+ automatically added to the widget allowing messages to be displayed as
+ it executes different tasks or when an error occurs. If none is provided,
+ only the errors are shown in a Ext.Window. It's also translated in
+ French.
+ </p>
+ <p>
+ <b>Please note : </b>in order to work properly with external urls, you
+ need to setup a proxy. You can either set the OpenLayers.ProxyHost or
+ use the widget local proxy setting. In this demo, plain local xml files
+ are used to avoid the setting of a proxy. There's a php one located in
+ this sample which you can use locally.
+ </p>
- <link rel="stylesheet" type="text/css" href="../../../../ext/resources/css/ext-all.css" />
- <link rel="stylesheet" type="text/css" href="../../../../ext/examples/shared/examples.css" />
-
- <!-- Ext.ux.StatusBar includes -->
- <link rel="stylesheet" type="text/css" href="../../../../ext/examples/ux/statusbar/css/statusbar.css" />
- <script type="text/javascript" src="../../../../ext/examples/ux/statusbar/StatusBar.js"></script>
-
- <!-- openlayers version trunk -->
- <script type="text/javascript" src="../../../../openlayers/lib/OpenLayers.js"></script>
- <!--script type="text/javascript" src="../../../../openlayers/lib/OpenLayers/Lang/fr.js"></script-->
- <script type="text/javascript" src="../../../../geoext/lib/GeoExt.js"></script>
-
- <!-- google v2 api for 192.168.4.120 -->
- <!--script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA3mOTdOkDlYkDjNn8Pnmr6RSx-0TMqGjMArKjswQRjIfEFr4DRBQbnmTwDEUT7Xj85OddpLMNrWtXoA'></script-->
- <!-- google v2 api for dev.geoext.org -->
- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA3mOTdOkDlYkDjNn8Pnmr6RTWxvN8zH6Ta_pgIhhU0TB7bG8iAhSdF2CWCQsaZn1qngCCwDaLVo3nCg'></script>
-
- <!-- openstreetmap for openlayers -->
- <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
-
- <!-- WMSBrowser source -->
- <link rel="stylesheet" type="text/css" href="../resources/css/WMSBrowser.css" />
- <script type="text/javascript" src="../lib/GeoExt.ux/SingleFile.js"></script>
- <!--script type="text/javascript" src="../resources/lang/fr.js"></script-->
-
-
- <!-- Example source -->
- <script type="text/javascript" src="./store.js"></script>
- <script type="text/javascript" src="WMSBrowserInWindowExample.js"></script>
- <!-- browserOptions -->
- <script type="text/javascript">
- browserOptions = {layerBrowserXtype: Ext.tree.TreePanel.xtype};
- </script>
-
- </head>
- <body>
- <h1>WMSBrowser using a TreePanel and a Ext.ux.StatusBar (example)</h1>
-
- <p>
- The WMSBrowser widget using a TreePanel (default) for listing the
- layers and Ext.ux.StatusBar to display the transaction messages.
- </p>
-
- <p>
- You only need to include the Ext.ux.StatusBar source files (js and
- css) in order to have it automatically included inside the widget.
- </p>
-
- <p>
- See
- <a href="WMSBrowserInWindowExample.js">
- WMSBrowserInWindowExample.js
- </a>
- for the source code.
- </p>
-
- <div id="content"></div>
- </body>
+ <script type="text/javascript"
+ src="../../../../ext/adapter/ext/ext-base.js"></script>
+ <script type="text/javascript"
+ src="../../../../ext/ext-all.js"></script>
+ <script type="text/javascript"
+ src="../../../../ext/examples/ux/statusbar/StatusBar.js"></script>
+ <script type="text/javascript"
+ src="../../../../openlayers/lib/OpenLayers.js"></script>
+ <!--script type="text/javascript"
+ src="../../../../openlayers/lib/OpenLayers/Lang/fr.js"></script-->
+ <script type="text/javascript"
+ src="../../../../geoext/lib/GeoExt.js"></script>
+ <script type="text/javascript"
+ src="../lib/GeoExt.ux/WMSBrowser.js"></script>
+ <!--script type="text/javascript" src="../resources/lang/fr.js"></script-->
+ <script type="text/javascript" src="WMSBrowser.js"></script>
+ </body>
</html>
Added: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.js (rev 0)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowser.js 2011-03-18 16:10:54 UTC (rev 2624)
@@ -0,0 +1,100 @@
+var WMSBrowser, mapPanel, browserWindow, tree, browserOptions = {}, serverStore;
+
+Ext.onReady(function() {
+ Ext.QuickTips.init();
+
+ serverStore = new Ext.data.SimpleStore({
+ fields: ['url'],
+ data : [
+ ['./data/wmscap.xml']
+ ,['./data/dev4g.mapgears.com_cgi-bin_mswms_gmap.xml']
+ ,['./data/dev4g.mapgears.com_cgi-bin_mswms_bdga.xml']
+ ,['./data/dev4g.mapgears.com_cgi-bin_mswms_gmap_incompatible_srs.xml']
+ ,['./data/dev4g.mapgears.com_cgi-bin_mswms_gmap_1.3.0.xml']
+ //,['http://dev4g.mapgears.com/cgi-bin/mswms_gmap']
+ ]
+ });
+
+ var actions = [];
+
+ var action = new Ext.Action({
+ text: 'WMSBrowser',
+ handler: openWindow,
+ scope: this,
+ tooltip: OpenLayers.i18n('Add currently selected layers')
+ });
+ actions.push(action);
+
+ var options = {
+ projection: new OpenLayers.Projection("EPSG:900913"),
+ displayProjection: new OpenLayers.Projection("EPSG:4326"),
+ units: "m",
+ numZoomLevels: 18,
+ maxResolution: 156543.0339,
+ maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
+ 20037508, 20037508.34)
+ };
+ map = new OpenLayers.Map('map', options);
+
+ mapPanel = new GeoExt.MapPanel({
+ region: "center",
+ layers: [new OpenLayers.Layer.OSM()],
+ map: map,
+ tbar: new Ext.Toolbar(actions)
+ });
+
+ tree = new Ext.tree.TreePanel({
+ region: 'east',
+ root: new GeoExt.tree.LayerContainer({
+ text: 'Map Layers',
+ layerStore: mapPanel.layers,
+ leaf: false,
+ expanded: true
+ }),
+ enableDD: true,
+ width: 170
+ });
+
+ new Ext.Panel({
+ renderTo: "content",
+ layout: "border",
+ width: 570,
+ height: 350,
+ items: [mapPanel, tree]
+ });
+
+ map.setCenter(new OpenLayers.LonLat(-10762333.581055,5968203.1676758), 2);
+});
+
+var openWindow = function() {
+ if(!browserWindow) {
+ var myBrowserOptions = Ext.apply(browserOptions, {
+ border: false,
+ region: "east",
+ zoomOnLayerAdded: false,
+ closeOnLayerAdded: false,
+ allowInvalidUrl: true,
+ alertPopupTimeout: 2000,
+ // === proxyHost === uncomment to use the local proxy
+ //proxyHost: "./WMSBrowserProxy.php?url=",
+ serverStore: serverStore,
+ mapPanelPreviewOptions: {height: 170, collapsed: false},
+ layerStore: mapPanel.layers
+ });
+
+ WMSBrowser = new GeoExt.ux.WMSBrowser(myBrowserOptions);
+
+ browserWindow = new Ext.Window({
+ resizable: true,
+ modal: false,
+ closeAction: 'hide',
+ width: 550,
+ height: 450,
+ title: OpenLayers.i18n("WMSBrowser"),
+ layout: 'fit',
+ items: [WMSBrowser]
+ });
+ }
+
+ browserWindow.show();
+};
Deleted: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.html
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.html 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.html 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,89 +0,0 @@
-<html>
- <head>
- <title>WMSBrowser (in Window) Example</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- ext version 3.1.0 -->
- <script type="text/javascript" src="../../../../ext/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="../../../../ext/ext-all.js"></script>
-
- <!-- ext version 3.1.0 debug -->
- <!--script type="text/javascript" src="../../../../ext/adapter/ext/ext-base-debug-w-comments.js"></script>
- <script type="text/javascript" src="../../../../ext/ext-all-debug.js"></script-->
-
- <link rel="stylesheet" type="text/css" href="../../../../ext/resources/css/ext-all.css" />
- <link rel="stylesheet" type="text/css" href="../../../../ext/examples/shared/examples.css" />
-
- <!-- Ext.ux.StatusBar includes -->
- <!--link rel="stylesheet" type="text/css" href="../../../../ext/examples/ux/statusbar/css/statusbar.css" />
- <script type="text/javascript" src="../../../../ext/examples/ux/statusbar/StatusBar.js"></script-->
-
- <!-- openlayers version trunk -->
- <script type="text/javascript" src="../../../../openlayers/lib/OpenLayers.js"></script>
- <script type="text/javascript" src="../../../../openlayers/lib/OpenLayers/Lang/fr.js"></script>
- <script type="text/javascript" src="../../../../geoext/lib/GeoExt.js"></script>
-
- <!-- google v2 api for 192.168.4.120 -->
- <!--script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA3mOTdOkDlYkDjNn8Pnmr6RSx-0TMqGjMArKjswQRjIfEFr4DRBQbnmTwDEUT7Xj85OddpLMNrWtXoA'></script-->
- <!-- google v2 api for dev.geoext.org -->
- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA3mOTdOkDlYkDjNn8Pnmr6RTWxvN8zH6Ta_pgIhhU0TB7bG8iAhSdF2CWCQsaZn1qngCCwDaLVo3nCg'></script>
-
- <!-- openstreetmap for openlayers -->
- <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
-
- <!-- WMSBrowser source -->
- <link rel="stylesheet" type="text/css" href="../resources/css/WMSBrowser.css" />
- <script type="text/javascript" src="../lib/GeoExt.ux/SingleFile.js"></script>
- <script type="text/javascript" src="../resources/lang/fr.js"></script>
-
-
- <!-- Example source -->
- <script type="text/javascript" src="./store.js"></script>
- <script type="text/javascript" src="WMSBrowserInWindowExample.js"></script>
-
- <!-- browserOptions -->
- <script type="text/javascript">
- browserOptions = {layerBrowserXtype: Ext.grid.GridPanel.xtype};
- </script>
-
- </head>
- <body>
- <h1>WMSBrowser (in Window) example</h1>
-
- <p>
- The WMSBrowser widget using a GridPanel as a
- layer listing method (requires the 'layerBrowserXtype' option set to
- Ext.grid.GridPanel.xtype).
- </p>
-
- <p>
- Click on the 'WMSBrowser' button to open the widget in a window.
- </p>
-
- <p>
- Select an url (currently xml files) from the list then click
- 'connect'. A list of layers appears on the left grid. Selecting one
- parse some more information in the form to the right. Double-clicking
- on one shows a preview of the layer in a small popup. After
- selecting a layer, click on the 'Add Layer' button below to add it
- to the map.
- </p>
-
- <p>
- Please, note that the current example use xml files stored locally
- in ./data/. In order to be able to use external WMS urls, you must
- use a proxy because of the 'Same origin policy' of ajax requests in
- javascript. One is included in this folder. Simply go to the js file
- below and uncomment the 'OpenLayers.ProxyHost' line to use it.
- </p>
-
- <p>
- See
- <a href="WMSBrowserInWindowExample.js">
- WMSBrowserInWindowExample.js
- </a>
- for the source code.
- </p>
-
- <div id="content"></div>
- </body>
-</html>
Deleted: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.js 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.js 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,100 +0,0 @@
-var WMSBrowser, mapPanel, browserWindow, tree, browserOptions = {};
-
-//OpenLayers.ProxyHost = "./proxy.php?url=";
-
-Ext.onReady(function() {
-
- Ext.QuickTips.init();
-
- var actions = [];
-
- var action = new Ext.Action({
- text: 'WMSBrowser',
- handler: openWindow,
- scope: this,
- tooltip: OpenLayers.i18n('Add currently selected layers')
- });
- actions.push(action);
-
- var options = {
- projection: new OpenLayers.Projection("EPSG:900913"),
- displayProjection: new OpenLayers.Projection("EPSG:4326"),
- units: "m",
- numZoomLevels: 18,
- maxResolution: 156543.0339,
- maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
- 20037508, 20037508.34)
- };
- map = new OpenLayers.Map('map', options);
-
- mapPanel = new GeoExt.MapPanel({
- region: "center",
- layers: [
- new OpenLayers.Layer.Google("Google Physical", {
- 'sphericalMercator': true, type: G_PHYSICAL_MAP,
- maxExtent: new OpenLayers.Bounds(
- -20037508, -20037508, 20037508, 20037508.34)
- })
- ],
- map: map,
- tbar: new Ext.Toolbar(actions)
- });
-
- tree = new Ext.tree.TreePanel({
- region: 'east',
- root: new GeoExt.tree.LayerContainer({
- text: 'Map Layers',
- layerStore: mapPanel.layers,
- leaf: false,
- expanded: true
- }),
- enableDD: true,
- width: 170
- });
-
- new Ext.Panel({
- renderTo: "content",
- layout: "border",
- width: 570,
- height: 350,
- items: [mapPanel, tree]
- });
-
- map.setCenter(new OpenLayers.LonLat(-10762333.581055,5968203.1676758), 2);
-});
-
-var openWindow = function() {
- if(!browserWindow) {
- var myBrowserOptions = Ext.apply(browserOptions, {
- border: false,
- region: "east",
- zoomOnLayerAdded: false,
- closeOnLayerAdded: false,
- allowInvalidUrl: true,
- alertPopupTimeout: 2000,
- // === proxyHost === uncomment to use the local proxy.php
- //proxyHost: "./proxy.php?url=",
- // comment the below line to have a 'textfield' instead of a
- // 'combobox'. oServerStore is in ./store.js
- serverStore: oServerStore,
- mapPanelPreviewOptions: {height: 170, collapsed: false},
- layerStore: mapPanel.layers
- });
-
- WMSBrowser = new GeoExt.ux.WMSBrowser(myBrowserOptions);
-
- browserWindow = new Ext.Window({
- resizable: true,
- modal: false,
- closeAction: 'hide',
- width: 550,
- height: 450,
- title: OpenLayers.i18n("WMSBrowser"),
- layout: 'fit',
- items: [WMSBrowser]
- });
- }
-
- browserWindow.show();
-
-};
Copied: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserProxy.php (from rev 2622, sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/proxy.php)
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserProxy.php (rev 0)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserProxy.php 2011-03-18 16:10:54 UTC (rev 2624)
@@ -0,0 +1,4 @@
+<?php
+header("Content-type: text/xml");
+readfile($_REQUEST['url']);
+?>
Deleted: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserWithStatusBar.html
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserWithStatusBar.html 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserWithStatusBar.html 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,73 +0,0 @@
-<html>
- <head>
- <title>WMSBrowser with a Ext.ux.StatusBar example</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- ext version 3.1.0 -->
- <script type="text/javascript" src="../../../../ext/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="../../../../ext/ext-all.js"></script>
-
- <!-- ext version 3.1.0 debug -->
- <!--script type="text/javascript" src="../../../../ext/adapter/ext/ext-base-debug-w-comments.js"></script>
- <script type="text/javascript" src="../../../../ext/ext-all-debug.js"></script-->
-
- <link rel="stylesheet" type="text/css" href="../../../../ext/resources/css/ext-all.css" />
- <link rel="stylesheet" type="text/css" href="../../../../ext/examples/shared/examples.css" />
-
- <!-- Ext.ux.StatusBar includes -->
- <link rel="stylesheet" type="text/css" href="../../../../ext/examples/ux/statusbar/css/statusbar.css" />
- <script type="text/javascript" src="../../../../ext/examples/ux/statusbar/StatusBar.js"></script>
-
- <!-- openlayers version trunk -->
- <script type="text/javascript" src="../../../../openlayers/lib/OpenLayers.js"></script>
- <script type="text/javascript" src="../../../../openlayers/lib/OpenLayers/Lang/fr.js"></script>
- <script type="text/javascript" src="../../../../geoext/lib/GeoExt.js"></script>
-
- <!-- google v2 api for 192.168.4.120 -->
- <!--script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA3mOTdOkDlYkDjNn8Pnmr6RSx-0TMqGjMArKjswQRjIfEFr4DRBQbnmTwDEUT7Xj85OddpLMNrWtXoA'></script-->
- <!-- google v2 api for dev.geoext.org -->
- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA3mOTdOkDlYkDjNn8Pnmr6RTWxvN8zH6Ta_pgIhhU0TB7bG8iAhSdF2CWCQsaZn1qngCCwDaLVo3nCg'></script>
-
- <!-- openstreetmap for openlayers -->
- <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
-
- <!-- WMSBrowser source -->
- <link rel="stylesheet" type="text/css" href="../resources/css/WMSBrowser.css" />
- <script type="text/javascript" src="../lib/GeoExt.ux/SingleFile.js"></script>
- <script type="text/javascript" src="../resources/lang/fr.js"></script>
-
-
- <!-- Example source -->
- <script type="text/javascript" src="./store.js"></script>
- <script type="text/javascript" src="WMSBrowserInWindowExample.js"></script>
-
- <!-- browserOptions -->
- <script type="text/javascript">
- browserOptions = {layerBrowserXtype: Ext.grid.GridPanel.xtype};
- </script>
-
- </head>
- <body>
- <h1>WMSBrowser with a Ext.ux.StatusBar example</h1>
-
- <p>
- The WMSBrowser widget using a Ext.ux.StatusBar and a GridPanel as a
- layer listing method (requires the 'layerBrowserXtype' option set to
- Ext.grid.GridPanel.xtype).
- </p>
-
- <p>
- You only need to include the Ext.ux.StatusBar source files (js and
- css) in order to have it automatically included inside the widget.
- </p>
-
- <p>
- See
- <a href="WMSBrowserInWindowExample.js">
- WMSBrowserInWindowExample.js
- </a>
- for the source code.
- </p>
-
- <div id="content"></div>
- </body>
-</html>
Deleted: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/proxy.php
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/proxy.php 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/proxy.php 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,4 +0,0 @@
-<?php
-header("Content-type: text/xml");
-readfile($_REQUEST['url']);
-?>
Deleted: sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/store.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/store.js 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/store.js 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,11 +0,0 @@
-var oServerStore = new Ext.data.SimpleStore({
- fields: ['url'],
- data : [
- ['./data/wmscap.xml']
- ,['./data/dev4g.mapgears.com_cgi-bin_mswms_gmap.xml']
- ,['./data/dev4g.mapgears.com_cgi-bin_mswms_bdga.xml']
- ,['./data/dev4g.mapgears.com_cgi-bin_mswms_gmap_incompatible_srs.xml']
- ,['./data/dev4g.mapgears.com_cgi-bin_mswms_gmap_1.3.0.xml']
- //,['http://dev4g.mapgears.com/cgi-bin/mswms_gmap']
- ]
-});
Deleted: sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/SingleFile.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/SingleFile.js 2011-03-18 15:34:29 UTC (rev 2623)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/SingleFile.js 2011-03-18 16:10:54 UTC (rev 2624)
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2008-2010 The Open Source Geospatial Foundation
- *
- * Published under the BSD license.
- * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
- * of the license.
- */
-
-/*
- * The code in this file is based on code taken from OpenLayers.
- *
- * Copyright (c) 2006-2007 MetaCarta, Inc., published under the Clear BSD
- * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license.
- */
-
-(function() {
-
- /**
- * The relative path of this script.
- */
- var scriptName = "lib/GeoExt.ux/SingleFile.js";
-
- /**
- * Function returning the path of this script.
- */
- var getScriptLocation = function() {
- var scriptLocation = "";
- // If we load other scripts right before GeoExt using the same
- // mechanism to add script resources dynamically (e.g. OpenLayers),
- // document.getElementsByTagName will not find the GeoExt script tag
- // in FF2. Using document.documentElement.getElementsByTagName instead
- // works around this issue.
- var scripts = document.documentElement.getElementsByTagName('script');
- for(var i=0, len=scripts.length; i<len; i++) {
- var src = scripts[i].getAttribute('src');
- if(src) {
- var index = src.lastIndexOf(scriptName);
- // set path length for src up to a query string
- var pathLength = src.lastIndexOf('?');
- if(pathLength < 0) {
- pathLength = src.length;
- }
- // is it found, at the end of the URL?
- if((index > -1) && (index + scriptName.length == pathLength)) {
- scriptLocation = src.slice(0, pathLength - scriptName.length);
- break;
- }
- }
- }
- return scriptLocation;
- };
-
- var jsfiles = new Array(
- "data/Store.js",
- "data/WMSBrowserWMSCapabilitiesStore.js",
- "plugins/WMSBrowserAlerts.js",
- "widgets/WMSBrowser.js",
- "widgets/WMSBrowserStatusBar.js",
- "widgets/grid/WMSBrowserGridPanel.js",
- "widgets/tree/WMSBrowserRootNode.js",
- "widgets/tree/WMSBrowserTreePanel.js"
- );
-
- var agent = navigator.userAgent;
- var docWrite = (agent.match("MSIE") || agent.match("Safari"));
- if(docWrite) {
- var allScriptTags = new Array(jsfiles.length);
- }
- var host = getScriptLocation() + "lib/GeoExt.ux/";
- for (var i=0, len=jsfiles.length; i<len; i++) {
- if (docWrite) {
- allScriptTags[i] = "<script src='" + host + jsfiles[i] +
- "'></script>";
- } else {
- var s = document.createElement("script");
- s.src = host + jsfiles[i];
- var h = document.getElementsByTagName("head").length ?
- document.getElementsByTagName("head")[0] :
- document.body;
- h.appendChild(s);
- }
- }
- if (docWrite) {
- document.write(allScriptTags.join(""));
- }
-})();
Added: sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/WMSBrowser.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/WMSBrowser.js (rev 0)
+++ sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/WMSBrowser.js 2011-03-18 16:10:54 UTC (rev 2624)
@@ -0,0 +1,87 @@
+/**
+ * Copyright (c) 2008-2010 The Open Source Geospatial Foundation
+ *
+ * Published under the BSD license.
+ * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
+ * of the license.
+ */
+
+/*
+ * The code in this file is based on code taken from OpenLayers.
+ *
+ * Copyright (c) 2006-2007 MetaCarta, Inc., published under the Clear BSD
+ * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license.
+ */
+
+(function() {
+
+ /**
+ * The relative path of this script.
+ */
+ var scriptName = "lib/GeoExt.ux/WMSBrowser.js";
+
+ /**
+ * Function returning the path of this script.
+ */
+ var getScriptLocation = function() {
+ var scriptLocation = "";
+ // If we load other scripts right before GeoExt using the same
+ // mechanism to add script resources dynamically (e.g. OpenLayers),
+ // document.getElementsByTagName will not find the GeoExt script tag
+ // in FF2. Using document.documentElement.getElementsByTagName instead
+ // works around this issue.
+ var scripts = document.documentElement.getElementsByTagName('script');
+ for(var i=0, len=scripts.length; i<len; i++) {
+ var src = scripts[i].getAttribute('src');
+ if(src) {
+ var index = src.lastIndexOf(scriptName);
+ // set path length for src up to a query string
+ var pathLength = src.lastIndexOf('?');
+ if(pathLength < 0) {
+ pathLength = src.length;
+ }
+ // is it found, at the end of the URL?
+ if((index > -1) && (index + scriptName.length == pathLength)) {
+ scriptLocation = src.slice(0, pathLength - scriptName.length);
+ break;
+ }
+ }
+ }
+ return scriptLocation;
+ };
+
+ var jsfiles = new Array(
+ "data/Store.js",
+ "data/WMSBrowserWMSCapabilitiesStore.js",
+ "plugins/WMSBrowserAlerts.js",
+ "widgets/WMSBrowser.js",
+ "widgets/WMSBrowserStatusBar.js",
+ "widgets/grid/WMSBrowserGridPanel.js",
+ "widgets/tree/WMSBrowserRootNode.js",
+ "widgets/tree/WMSBrowserTreePanel.js"
+ );
+
+ var agent = navigator.userAgent;
+ var docWrite = (agent.match("MSIE") || agent.match("Safari"));
+ if(docWrite) {
+ var allScriptTags = new Array(jsfiles.length);
+ }
+ var host = getScriptLocation() + "lib/GeoExt.ux/";
+ for (var i=0, len=jsfiles.length; i<len; i++) {
+ if (docWrite) {
+ allScriptTags[i] = "<script src='" + host + jsfiles[i] +
+ "'></script>";
+ } else {
+ var s = document.createElement("script");
+ s.src = host + jsfiles[i];
+ var h = document.getElementsByTagName("head").length ?
+ document.getElementsByTagName("head")[0] :
+ document.body;
+ h.appendChild(s);
+ }
+ }
+ if (docWrite) {
+ document.write(allScriptTags.join(""));
+ }
+})();
More information about the Commits
mailing list