Table of Contents | ||
---|---|---|
|
Description
Info |
---|
This widget is still in active development but a basic version is available for testing purposes. |
The geoserver widget enables the display of large datasets on a map by utilising the web mapping service provided by geoserver.
...
layer
: String - The name of the layer as it exists on geoserver.
featureActionText
: (Not yet available for use) String | Null - Text to display in the button when a feature is selected. If set to null no button will display.
...
Code Block |
---|
{ "center": {"lat": -34.151771086784734, "lng": 21.258544921875}, "zoom": 10, "maxZoom": 19, "featureActionText": "Edit Properties", "layers": [ { "name": "Hessequa Stands", "workspace": "hessequa", "layer": "mv_bi_geo_stands_water" } ] } |
...
Features
Layers
The Geosever Map Widget allows for the display of multiple layers on the map but only allows for the selection of one layer at a time. The selection layer is indicated by the “pointer“ symbol in the layer dropdown. Clicking on the lock icon of a particular layer will make that layer the selection layer.
...
Legends
Legends for your layers are automatically retrieved from geoserver and displayed in the legend tab. It is important to note that the legend is directly linked to the style used by the layer which is configured on geoserver.
...
Adding Layers on Geoserver
Log in to geoserver here https://sams-geoserver-staging.heliumapps.com/geoserver using your Helium ID credentials. (You may require permissions from devops to access geoserver)
Create a workspace for your project - this will be where all the layers for your project live. (You may require devops to create the workspace for you)
Create a store within your workspace - this will be the connection to a specific schema in the Helium Rapid database.
After clicking “Add new store” select the option for “PostGIS Database“
Select the correct workspace and fill in the required connection parameters
host: za-preprod-db-1b
(you may require the postgres user & password from devops)All other values can be left as is, click save
Add your layers - these will be the layers you would like to display
Before adding your layer, be sure to grant the necessary
select
&usage
permissions on the schema you will be using for the geoserver user.Select the workspace you would like to add layers for
All the tables within the specified schema will be displayed. Choose the desired table and click publish.
The coordinate reference system should indicate EPSG:4326, if not you will need to set this correctly under “Declared SRS”
Under bounding boxes you will need to click on both “Compute from data“ and “Compute from native bounds“
Click save
You can change the style of the layer either by creating a new style or selecting a predefined style.
To select a predefined style click on the layer name on the layers page.
Select the “Publishing” tab
Scroll down to “WMS Settings” and select the default style from the dropdown.
Create a new style - this will be the style for a specific layer and can be create within geoserver or via a program like Qgis. Once the style is created a legend will automatically be created on geoserver. You are also free to upload your own legend.
Give your style a name and select the appropriate workspace.
You can choose to generate a style based on existing styles to get started