| 5 | | This is the getting started doc. |
|---|
| | 5 | Installing GeoExplorer on your server |
|---|
| | 6 | ------------------------------------- |
|---|
| | 7 | |
|---|
| | 8 | The easiest way to install GeoExplorer is to use the Vulcan Installer. This |
|---|
| | 9 | will install GeoServer, GeoExplorer and the required proxy. Once GeoServer is |
|---|
| | 10 | started, GeoExplorer can be accessed at |
|---|
| | 11 | http://localhost:8080/geoserver/www/GeoExplorer/index.html. |
|---|
| | 12 | |
|---|
| | 13 | But GeoExplorer will run on any HTTP server, like Apache. All that needs to be |
|---|
| | 14 | done is unpack GeoExplorer to a web accessible path on your server. There is |
|---|
| | 15 | only server side requirement: an OGC service proxy. If you have Python |
|---|
| | 16 | installed, you can e.g. use the OpenGeo python proxy: |
|---|
| | 17 | http://svn.opengeo.org/util/proxy/proxy.py. Information on how to configure |
|---|
| | 18 | Apache to use that proxy are included in the file. |
|---|
| | 19 | |
|---|
| | 20 | Initial Configuration |
|---|
| | 21 | --------------------- |
|---|
| | 22 | |
|---|
| | 23 | Once installed, GeoExplorer will work out of the box, configured to use |
|---|
| | 24 | http://demo.opengeo.org/geoserver/ows as WMS. Starting from here, layers and |
|---|
| | 25 | WMS servers can be added and configured as described in the :doc:`Working With |
|---|
| | 26 | GeoExplorer <working-with-geoexplorer>` documentation. |
|---|
| | 27 | |
|---|
| | 28 | If, however, you want to provide a customized application builder, here is how |
|---|
| | 29 | to configure it: |
|---|
| | 30 | |
|---|
| | 31 | The startup WMS or additional WMS servers can be configured by modifying |
|---|
| | 32 | GeoExplorer/index.html: |
|---|
| | 33 | |
|---|
| | 34 | .. code-block:: javascript |
|---|
| | 35 | |
|---|
| | 36 | wms: { |
|---|
| | 37 | "demo": "http://demo.opengeo.org/geoserver/ows/" |
|---|
| | 38 | }, |
|---|
| | 39 | |
|---|
| | 40 | "demo" is the key used to reference the WMS in the layer configuration (see |
|---|
| | 41 | below). More servers can be added easily, e.g. by changing the above to |
|---|
| | 42 | |
|---|
| | 43 | .. code-block:: javascript |
|---|
| | 44 | |
|---|
| | 45 | wms: { |
|---|
| | 46 | "demo": "http://demo.opengeo.org/geoserver/ows/", |
|---|
| | 47 | "terraserver": "http://terraserver-usa.com/ogccapabilities.ashx" |
|---|
| | 48 | }, |
|---|
| | 49 | |
|---|
| | 50 | Two layers will be loaded by default: |
|---|
| | 51 | |
|---|
| | 52 | * Global Imagery (topp:bluemarble) as base layer |
|---|
| | 53 | * USA Population (topp:states) as overlay |
|---|
| | 54 | |
|---|
| | 55 | The layers to be loaded at startup can be configured in GeoExplorer/index.html: |
|---|
| | 56 | |
|---|
| | 57 | .. code-block:: javascript |
|---|
| | 58 | |
|---|
| | 59 | map: { |
|---|
| | 60 | layers: [{ |
|---|
| | 61 | name: "topp:bluemarble", |
|---|
| | 62 | title: "Global Imagery", |
|---|
| | 63 | wms: "demo", |
|---|
| | 64 | group: "background" |
|---|
| | 65 | }, { |
|---|
| | 66 | name: "topp:states", |
|---|
| | 67 | wms: "demo", |
|---|
| | 68 | visibility: true |
|---|
| | 69 | }], |
|---|
| | 70 | center: [-96.7, 37.6], |
|---|
| | 71 | zoom: 4 |
|---|
| | 72 | } |
|---|
| | 73 | |
|---|
| | 74 | The ``name`` property of the layers (e.g. "topp:states" in the above snippet) |
|---|
| | 75 | are the layer names from the Capabilities document of the |
|---|
| | 76 | WMS (see |
|---|
| | 77 | `<http://demo.opengeo.org/geoserver/ows/?SERVICE=WMS&REQUEST=GetCapabilities>`_ |
|---|
| | 78 | for a complete example): |
|---|
| | 79 | |
|---|
| | 80 | .. code-block:: xml |
|---|
| | 81 | |
|---|
| | 82 | <Layer queryable="1"> |
|---|
| | 83 | <Name>topp:states</Name> |
|---|
| | 84 | <Title>USA Population</Title> |
|---|
| | 85 | <Abstract>This is some census data on the states.</Abstract> |
|---|
| | 86 | <KeywordList> |
|---|
| | 87 | <Keyword>census</Keyword> |
|---|
| | 88 | <Keyword>united</Keyword> |
|---|
| | 89 | <Keyword>boundaries</Keyword> |
|---|
| | 90 | <Keyword>state</Keyword> |
|---|
| | 91 | <Keyword>states</Keyword> |
|---|
| | 92 | </KeywordList> |
|---|
| | 93 | <SRS>EPSG:4326</SRS> |
|---|
| | 94 | <LatLonBoundingBox minx="-125.30903773" miny="7.705448770000002" maxx="-66.39223326999999" maxy="66.62225323"/> |
|---|
| | 95 | <BoundingBox SRS="EPSG:4326" minx="-124.73142200000001" miny="24.955967" maxx="-66.969849" maxy="49.371735"/> |
|---|
| | 96 | <Style> |
|---|
| | 97 | <Name>population</Name> |
|---|
| | 98 | <Title>Population in the United States</Title> |
|---|
| | 99 | <Abstract>A sample filter that filters the United States into three |
|---|
| | 100 | categories of population, drawn in different colors</Abstract> |
|---|
| | 101 | <LegendURL width="20" height="20"> |
|---|
| | 102 | <Format>image/png</Format> |
|---|
| | 103 | <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://demo.opengeo.org/geoserver/wms/GetLegendGraphic?VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=topp:states"/> |
|---|
| | 104 | </LegendURL> |
|---|
| | 105 | </Style> |
|---|
| | 106 | </Layer> |
|---|
| | 107 | |
|---|
| | 108 | The ``title`` property is optional. By default, the title from the |
|---|
| | 109 | Capabilities document will be used. |
|---|
| | 110 | |
|---|
| | 111 | The ``wms`` property tells the application on which server to find the layer. |
|---|
| | 112 | If we would like to add a layer from the "terraserver" WMS that we configured |
|---|
| | 113 | above, we would simply set ``wms`` to "terraserver". |
|---|
| | 114 | |
|---|
| | 115 | Layers that should not be visible when loading the application, but shown in |
|---|
| | 116 | the layer tree, can be configured with the ``visibility`` property set to |
|---|
| | 117 | false. |
|---|
| | 118 | |
|---|
| | 119 | Layers with the ``group`` property set to "background" will be base layers. |
|---|
| | 120 | Only one base layer can be visible at a time. |
|---|
| | 121 | |
|---|
| | 122 | The ``center`` and ``zoom`` properties are also optional. If not provided, |
|---|
| | 123 | the map extent will be set to the LatLonBoundingBox specified in the |
|---|
| | 124 | Capabilities document. For a configuration with more than one layers, the |
|---|
| | 125 | extent will be taken from the first layer in the "background" group, or the |
|---|
| | 126 | first layer if there are no layers in the "background" group. |
|---|