< Locate Plugin

AJAX >

20. WMS Browser

20.1. Introduction

wmsBrowser plugin allows you to save WMS servers properties locally to preview their layers, manage these servers (upgrade, delete, refresh properties, disconnect a remote server that is no more avaible, ...), add a chosen WMS layer to the map and delete all added WMS layers.

To have the plugin working, you must install Chameleon XML parser first, load plugin and set a few configuration files parameters.

20.2. Installing Chameleon XML Parser

  • Download Chameleon extension package from http://cartoweb.org/downloads.html#chameleon_ext.
  • Uncompress the archive and follow steps described in chameleon/ext/README.txt file to compile it.
  • Copy chameleon/ext/php/modules/chameleon.so extension to your php extensions directory and load it in your php.ini.

Tip

If using Debian or Ubuntu OS, you may install our precompiled package:

apt-get install php5-chameleon

See Appendix A, Mapserver Debian Installation for instructions about apt.

Warning

If your PHP isn't running as CGI, don't forget to restart your web server.

20.3. Plugin Activation

To activate the plugin, load mapOverlay and wmsBrowser plugins from both CartoClient and CartoServer configuration files: client_conf/client.ini and server_conf/"mapId"/"mapId".ini. For instance:

loadPlugins = mapOverlay, wmsBrowser
        

20.4. Position to Which Insert WMS Layers

To insert a WMS layer on the map, you must specify after which mapfile layer you want to insert it. The layer will be added after the last added WMS layer or after this mapfile layer (if no WMS layer has ever been added).

To do so, in server_conf/"mapId"/wmsBrowser.ini, specify the mapfile layer name in the wmsInsertLayerAfter parameter.

20.5. Perform Added WMS Layers Appearance in the Layers List

If you want to perform added WMS layers appearance in the layers list, you still have to affect them a parent LayerGroup. Specify, in client_conf/layers.ini, the LayerGroup name in the userLayerGroup parameter (default is root).

valid xhtml 1.0 valid css