gxp.plugins.GeoServerStyleWriter

Extends
ptype
gxp_geoserverstylewriter
class gxp.plugins.GeoServerStyleWriter(config)

Save styles from gxp.WMSStylesDialog or similar classes that have a layerRecord and a stylesStore with a userStyle field. The plugin provides a save method, which will use the GeoServer RESTConfig API to persist style changes from the stylesStore to the server and associate them with the layer referenced in the target’s layerRecord.

Config Options

Configuration properties in addition to those listed for Ext.util.Observable.

baseUrl

String The base url for the GeoServer REST API. Default is “/geoserver/rest”.

Public Properties

Public properties in addition to those listed for Ext.util.Observable.

GeoServerStyleWriter.deletedStyles

Array(String) style names of styles from the server that were deleted and have to be removed from the server

Public Methods

Public methods in addition to those listed for Ext.util.Observable.

GeoServerStyleWriter.write()
Parameters:optionsObject

Saves the styles of the target’s layerRecord using GeoServer’s RESTconfig API.

Supported options:

  • defaultStyle - String If set, the default style will be set.
  • success - Function A function to call when all styles were written successfully.
  • scope - Object A scope to call the success function with.