Revision 8265
Added by ben leinfelder over 10 years ago
geoserver.rst | ||
---|---|---|
48 | 48 |
is used to configure GeoServer to use this shared data directory. To further |
49 | 49 |
configure GeoServer, use the Web-based configuration utility, |
50 | 50 |
which is available at: http://your.server.com/context/geoserver.jsp |
51 |
(e.g., http://knb.ecoinformatics.org/knb/geoserver.jsp).
|
|
51 |
(e.g., http://knb.ecoinformatics.org/metacat/geoserver.jsp).
|
|
52 | 52 |
|
53 | 53 |
Common configuration tasks include: |
54 | 54 |
|
... | ... | |
106 | 106 |
To add a map to a Web page, simply include the map interface using an iframe:: |
107 | 107 |
|
108 | 108 |
<iframe scrolling="no" frameborder="0" width="780" height="420" |
109 |
src="/knb/style/common/spatial/map.jsp">
|
|
109 |
src="/metacat/style/common/spatial/map.jsp">
|
|
110 | 110 |
</iframe> |
111 | 111 |
|
112 |
The map URL, ``/knb/style/common/spatial/map.jsp``, is
|
|
112 |
The map URL, ``/metacat/style/common/spatial/map.jsp``, is
|
|
113 | 113 |
the default map interface. If you plan to customize the map interface, copy |
114 | 114 |
the map.jsp file into your skin's directory (either the default or |
115 | 115 |
customized skin directory). |
... | ... | |
118 | 118 |
|
119 | 119 |
cp -r style/common/spatial/map.jsp /style/skins/<myskin>/spatial |
120 | 120 |
|
121 |
You can access the customized map with the URL: ``/knb/style/skins/<myskin>/spatial/map.jsp``
|
|
121 |
You can access the customized map with the URL: ``/metacat/style/skins/<myskin>/spatial/map.jsp``
|
|
122 | 122 |
|
123 | 123 |
Configuring the Size and Initial Extent of the Map |
124 | 124 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
... | ... | |
127 | 127 |
:doc:`configuration` for directions). Once the file has been copied, you can |
128 | 128 |
modify the map's initial extent in: ``${skin.dir}/spatial/map.jsp``. |
129 | 129 |
|
130 |
To change the map’s initial extent, edit the bounding box. The default is to
|
|
130 |
To change the map's initial extent, edit the bounding box. The default is to
|
|
131 | 131 |
show the entire globe. The ``initMap()`` function should also be given the skin |
132 | 132 |
name so that spatial search results can be correctly styled. |
133 | 133 |
|
... | ... | |
160 | 160 |
|
161 | 161 |
:: |
162 | 162 |
|
163 |
<option value=“-149.725,68.475 -149.3254,68.725”> Arctic LTER (ARC)</option>
|
|
163 |
<option value="-149.725,68.475 -149.3254,68.725"> Arctic LTER (ARC)</option>
|
|
164 | 164 |
|
165 | 165 |
Configuring the Visual Portrayal of Geospatial Data (e.g., symbology and color) |
166 | 166 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
... | ... | |
188 | 188 |
|
189 | 189 |
1. Point your browser to ``http://your.server/geoserver``, log in to GeoServer, |
190 | 190 |
and navigate to the "Data Stores" configuration page under ``Data > Stores``. |
191 |
2. Create a new vector data source from a Shapefile in the “metacat” workspace.
|
|
191 |
2. Create a new vector data source from a Shapefile in the "metacat" workspace.
|
|
192 | 192 |
|
193 | 193 |
.. figure:: images/screenshots/image055.png |
194 | 194 |
:align: center |
... | ... | |
219 | 219 |
GeoServer's Layer Preview allows you to see an OpenLayer rendering of the new layer. |
220 | 220 |
|
221 | 221 |
8. Copy the default ``map.js`` file that assembles the map in OpenLayers |
222 |
(``style/common/spatial/map.js``) to your skin’s spatial directory.
|
|
223 |
9. Edit the init() method to include your new layer in the map – either as an
|
|
222 |
(``style/common/spatial/map.js``) to your skin's spatial directory.
|
|
223 |
9. Edit the init() method to include your new layer in the map - either as an
|
|
224 | 224 |
overlay or as a base layer. |
225 | 225 |
10. Point your browser to the map interface. Your new layer should appear with |
226 | 226 |
the existing ones. |
... | ... | |
229 | 229 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
230 | 230 |
There are hundreds of sources of spatial data made publically available |
231 | 231 |
through WMS (check out http://wms-sites.com for a good catalog). To add these |
232 |
data sources to your map, add the layers in your skin’s ``spatial/map.js`` file.
|
|
232 |
data sources to your map, add the layers in your skin's ``spatial/map.js`` file.
|
|
233 | 233 |
|
234 | 234 |
Spatial Queries |
235 | 235 |
--------------- |
... | ... | |
239 | 239 |
|
240 | 240 |
An example of a spatial query string is:: |
241 | 241 |
|
242 |
http://localhost/knb/metacat?action=spatial_query&xmin=-117.5&xmax=-64&ymin=3&ymax=46&skin=default
|
|
242 |
http://localhost/metacat/metacat?action=spatial_query&xmin=-117.5&xmax=-64&ymin=3&ymax=46&skin=default
|
|
243 | 243 |
|
244 | 244 |
Where ``xmin``, ``xmax``, ``ymin`` and ``ymax`` represent the western, eastern, |
245 | 245 |
southern and northern bounding coordinates (the "bounding box"), respectively. |
Also available in: Unified diff
Refer to metacat.war deployments since those are now the default. https://projects.ecoinformatics.org/ecoinfo/issues/6082