Create a Style

GeoServer Tutorials > Create a Style

 

 

1. Click Styles on the left menu

 

2. Click the “Add new style” link
 

 

3. For name, enter 'WaterStyle'. For Workspace, select postgis.

 

4. In “Copy from existing style” dropdown, select green
 

 

5. Click the “copy” link to the right of the dropdown
 

 

6. As seen below, this loads the existing 'green' style into the style editor. We will use this to create our WaterStyle blue.

 

Copy an Existing Style

Now that we have loaded the 'green' style to use as our template, we will update it to blue. To do so,

1. Update the required lines, as shown below:
 

 

2. Click 'Validate to check for errors. If no errors, click the Save button. Your new Style, “Waterways” should now appear in the Styles list.
  

 

Apply Style

1. Click the Layers button in the left menu
2. Select the waterways layer

 

3. In the Publishing tab, select postgis:WaterStyle from the Default Style dropsown
 

 

4. On select, we should see the thumbnail reflect the blue color we chose above
 

 

5. Click the Save button.

If we now preview our layer in Layer Preview, our layer is now blue.

 

 
   

 

 

 

 

Clients and Sectors

AcuGIS provides GIS Hosting Services to customers in over 80 countries worlwide.

International

International governmental institutions. Email gov@acugis.com

Government

Local, State, and Federal Governments. Email gov@acugis.com

Academia

iscounts for Academic institutions. Email edu@acugis.com

NGO

Non-Governmental Organizations. Email edu@acugis.com

Research

Public and Private Research institutions. Email edu@acugis.com

Developers

Developer-friendly tools and great features