[Commits] r1018 - in apps/opengeo/geoexplorer/branches/0.1.x: . build
commits at geoext.org
commits at geoext.org
Mon Jun 8 19:35:04 CEST 2009
Author: tschaub
Date: 2009-06-08 19:35:04 +0200 (Mon, 08 Jun 2009)
New Revision: 1018
Modified:
apps/opengeo/geoexplorer/branches/0.1.x/README.TXT
apps/opengeo/geoexplorer/branches/0.1.x/build/index.html
apps/opengeo/geoexplorer/branches/0.1.x/debug.html
Log:
Updated instructions.
Modified: apps/opengeo/geoexplorer/branches/0.1.x/README.TXT
===================================================================
--- apps/opengeo/geoexplorer/branches/0.1.x/README.TXT 2009-06-08 16:40:06 UTC (rev 1017)
+++ apps/opengeo/geoexplorer/branches/0.1.x/README.TXT 2009-06-08 17:35:04 UTC (rev 1018)
@@ -2,70 +2,73 @@
Running and deploying GeoExplorer
=================================
-Downloading and unpacking Ext JS
---------------------------------
-GeoExplorer requires version 2.2.x of the Ext JS library.
+These instructions describe how to deploy GeoExplorer assuming you have a copy
+of the application source code from subversion.
-1. Download Ext JS SDK 2.2.1 from
- http://www.extjs.com/products/extjs/download.php
-2. Read the Ext JS license page (http://www.extjs.com/products/license.php)
- and choose the appropriate license for your needs
-3. Create a folder externals/ext in your geoexplorer root directory
-4. Unpack the downloaded file (ext-2.2.1.zip) to the folder created in step 3
+Getting a copy of the application
+---------------------------------
-Connecting GeoExplorer to a GeoServer instance
-----------------------------------------------
+To get a copy of the application source code, use subversion::
+
+ you at prompt:~$ svn export http://svn.geoext.org/apps/opengeo/geoexplorer/branches/0.1.x/ geoexplorer
+
+
+Running in development mode
+---------------------------
+
+Your copy of the application contains a debug.html file that loads the
+application for debugging/development. This file is not suitable for running
+the application in production. To view the application, open the debug.html
+page in a browser (e.g. http://localhost/path/to/geoexplorer/debug.html).
+
+Note that the inital configuration for the application works off of a remote
+WMS and requires that you have a proxy set up locally. See the debug.html
+source for detail on configuration with a local WMS.
+
+
+Connecting GeoExplorer to a local GeoServer
+-------------------------------------------
+
The easiest way to run GeoExplorer is to place it in the www folder of a
GeoServer data dir.
-1. Copy the geoexplorer root directory (with Ext JS unpacked as described
- above) to $GEOSERVER_DATA_DIR/www/
-2. If the path of your GeoServer instance is different than /geoserver, modify
- the ows setting in debug.html and index.html in your geoexplorer root
- directory to point to your GeoServer web path
+1. Copy the geoexplorer root directory to $GEOSERVER_DATA_DIR/www/
-Test GeoExplorer by running the debug version
----------------------------------------------
-If installed as described above, you should be able to run GeoExplorer by
-pointing your web browser to
-http://localhost:8080/geoserver/www/geoexplorer/debug.html (assuming your
-browser is running on the same machine as your GeoServer instance).
+2. Modify the "ows" configuration value in geoexplorer/debug.html to reflect the
+path to your GeoServer WMS endpoint (usually "/geoserver/wms").
-Running GeoExplorer this way is slow because many small JavaScript files will
-be loaded dynamically. Therefore it is recommended to build GeoExplorer as
-described below.
+3. Open the debug.html page in a browser (e.g.
+http://localhost:8080/geoserver/www/geoexplorer/debug.html)
-Build GeoExplorer with minified JS files for better performance
----------------------------------------------------------------
-1. Download and install JSTools following the instructions in README.rst
- on http://github.com/whitmo/jstools/
-2. Open a console in your geoexplorer/build folder and run
- ``jsbuild build.cfg -o ../script/``
-2. Now you should have four minified JS files in your geoexplorer/script
- folder. To try your built version of GeoExplorer, point your browser to
- http://localhost:8080/geoserver/www/geoexplorer/index.html and enjoy the
- performance boost.
-Removing unneeded directories and files (optional)
---------------------------------------------------
-If you want a lean installation, you can remove everything except the files
-and folders in the folder tree below:
+Preparing the application for deployment
+----------------------------------------
-::
+Running GeoExplorer as described above is not suitable for production because
+JavaScript files will be loaded dynamically. Before moving your application
+to a production environment, follow the steps below.
- geoexplorer
- externals
- ext
- adapter
- ext
- resources
- geoext
- resources
- openlayers
- img
- theme
- script
- theme
- about.html
- index.html
-
\ No newline at end of file
+1. Copy any changes to the app configuration you made in debug.html into the
+geoexplorer/build/index.html file. Just copy the changes to the JavaScript -
+do not copy the entire contents of debug.html to index.html.
+
+2. If you have not already set up JSTools, do so following the instructions
+you find on the JSTools project page: http://pypi.python.org/pypi/JSTools
+
+3. Use the Makefile in the build directory to create a standalone copy of the
+application.
+
+For example, to create a directory that can be moved to your production
+environment, do the following::
+
+ you at prompt:~$ cd geoexplorer/build
+ you at prompt:~/geoexplorer/build$ make app
+
+Move the GeoExplorer directory (from the build directory) to your production
+environment.
+
+If you want to create a zip archive of the application, instead run the
+following:::
+
+ you at prompt:~/geoexplorer/build$ make zip
+
Modified: apps/opengeo/geoexplorer/branches/0.1.x/build/index.html
===================================================================
--- apps/opengeo/geoexplorer/branches/0.1.x/build/index.html 2009-06-08 16:40:06 UTC (rev 1017)
+++ apps/opengeo/geoexplorer/branches/0.1.x/build/index.html 2009-06-08 17:35:04 UTC (rev 1018)
@@ -6,32 +6,33 @@
<!-- Ext resources -->
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/xtheme-gray.css" />
- <script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2/ext-all.js"></script>
- <script type="text/javascript" src="script/ExtUx.js"></script>
+ <script src="http://extjs.cachefly.net/ext-2.2/adapter/ext/ext-base.js"></script>
+ <script src="http://extjs.cachefly.net/ext-2.2/ext-all.js"></script>
+ <script src="script/ExtUx.js"></script>
<!-- OpenLayers resources -->
<link rel="stylesheet" type="text/css" href="theme/ol/style.css" />
- <script type="text/javascript" src="script/OpenLayers.js"></script>
+ <script src="script/OpenLayers.js"></script>
<!-- GeoExt resources -->
- <script type="text/javascript" src="script/GeoExt.js"></script>
<link rel="stylesheet" type="text/css" href="theme/gx/css/geoext-all-debug.css" />
<link rel="stylesheet" type="text/css" href="theme/gx/css/gxtheme-gray.css" />
+ <script type="text/javascript" src="script/GeoExt.js"></script>
<!-- GeoExplorer resources -->
<link rel="stylesheet" type="text/css" href="theme/app/geoexplorer.css" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="theme/app/ie.css"/><![endif]-->
- <script type="text/javascript" src="script/GeoExplorer.js"></script>
+ <script src="script/GeoExplorer.js"></script>
<script>
- Ext.BLANK_IMAGE_URL = "theme/app/img/blank.gif";
+ Ext.BLANK_IMAGE_URL = "theme/img/blank.gif";
var app = new GeoExplorer({
+ ows: "http://demo.opengeo.org/geoserver/wms",
proxy: "/proxy/?url=",
- ows: "http://publicus.opengeo.org/geoserver/wms",
map: {
layers: [{
- name: "topp:states"
+ name: "topp:bluemarble",
+ title: "Global Imagery"
}],
center: [-96.7, 37.6],
zoom: 4
Modified: apps/opengeo/geoexplorer/branches/0.1.x/debug.html
===================================================================
--- apps/opengeo/geoexplorer/branches/0.1.x/debug.html 2009-06-08 16:40:06 UTC (rev 1017)
+++ apps/opengeo/geoexplorer/branches/0.1.x/debug.html 2009-06-08 17:35:04 UTC (rev 1018)
@@ -6,40 +6,64 @@
<!-- Ext resources -->
<link rel="stylesheet" type="text/css" href="externals/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="externals/ext/resources/css/xtheme-gray.css" />
- <script type="text/javascript" src="externals/ext/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="externals/ext/ext-all-debug.js"></script>
+ <script src="externals/ext/adapter/ext/ext-base.js"></script>
+ <script src="externals/ext/ext-all-debug.js"></script>
<!-- OpenLayers resources -->
<link rel="stylesheet" type="text/css" href="externals/openlayers/theme/default/style.css" />
- <script type="text/javascript" src="externals/openlayers/lib/OpenLayers.js"></script>
+ <script src="externals/openlayers/lib/OpenLayers.js"></script>
<!-- GeoExt resources -->
- <script type="text/javascript" src="externals/geoext/lib/GeoExt.js"></script>
<link rel="stylesheet" type="text/css" href="externals/geoext/resources/css/geoext-all-debug.css" />
<link rel="stylesheet" type="text/css" href="externals/geoext/resources/css/gxtheme-gray.css" />
+ <script src="externals/geoext/lib/GeoExt.js"></script>
<!-- GeoExplorer resources -->
<link rel="stylesheet" type="text/css" href="theme/geoexplorer.css" />
- <!--[if IE]>
- <link rel="stylesheet" type="text/css" href="theme/ie.css"/><![endif]-->
+ <!--[if IE]><link rel="stylesheet" type="text/css" href="theme/ie.css"/><![endif]-->
+ <script src="lib/GeoExplorer.js"></script>
+ <script src="lib/GeoExplorer/util.js"></script>
+ <script src="lib/Ext/grid/RowExpander.js"></script>
+ <script src="lib/GeoExplorer/CapabilitiesGrid.js"></script>
- <script type="text/javascript" src="lib/GeoExplorer.js"></script>
- <script type="text/javascript" src="lib/GeoExplorer/util.js"></script>
- <script type="text/javascript" src="lib/Ext/grid/RowExpander.js"></script>
- <script type="text/javascript" src="lib/GeoExplorer/CapabilitiesGrid.js"></script>
-
<script>
Ext.BLANK_IMAGE_URL = "theme/img/blank.gif";
+
var app = new GeoExplorer({
- proxy: "/proxy/?url=",
- ows: "http://publicus.opengeo.org/geoserver/wms",
+
+ /**
+ * The application loads capabilities from a single WMS. The
+ * ows value below is an absolute URL for this WMS. Because the
+ * application loads capabilities from a different host than the
+ * one that serves this application, you need to configure a
+ * proxy to have the application work.
+ *
+ * If you have a WMS running on the same origin as this application
+ * you can use a relative URL and remove the proxy property below.
+ */
+ ows: "http://demo.opengeo.org/geoserver/wms",
+
+ /**
+ * If you do not have a WMS running on the same host that serves
+ * this application, you need to set up a proxy. For a proxy
+ * that works with mod_python, see the following:
+ * http://svn.opengeo.org/util/proxy/proxy.py
+ *
+ * If you do have a WMS on the same origin as this application,
+ * provide a relative URL for the WMS above and comment out this
+ * proxy property below.
+ */
+ proxy: "/proxy/?url=",
+
map: {
layers: [{
- name: "topp:states"
+ name: "topp:bluemarble",
+ title: "Global Imagery"
}],
center: [-96.7, 37.6],
zoom: 4
}
+
});
</script>
More information about the Commits
mailing list