.. _widget-wmslayeradder-label: ======================== WMSLayerAdder ======================== .. note:: This widget is **deprecated**. Widget that permits a user to add layers that are setted manually, removed from the workspace or from a external server. .. note:: This widget can't be drawn with the drawWidget template. Instead, it must be added to one of the toolbar widgets : * Toolbar * GeoExtToolbar XML Sample ------------ Configuration using the cookie mode .. code-block:: xml WLA_Sample cookie Metacarta Metacarta http://labs.metacarta.com/wms/vmap0 basic 0.5 Configuration using curl mode .. code-block:: xml WLA_Sample curl relative userwmslist.php $_SESSION[login_username] Metacarta Metacarta http://labs.metacarta.com/wms/vmap0 basic 0.5 Configuration using db mode .. code-block:: xml WLA_Sample db mysql:localhost;port=xxxx;dbname=mydbname myuser mypassword SELECT id,user, pass, url,description FROM user_wmslist AS w INNER JOIN user AS u ON w.idUser=u.idUser WHERE u.username = :0 $_SESSION[login_username] INSERT INTO user_wmslist (id, idUser,user,pass,url,description) VALUES(NULL,(SELECT idUser FROM user WHERE username = :0 LIMIT 1),:1,:2,:3,:4) $_SESSION[login_username],$_REQUEST[user],$_REQUEST[pwd],$_REQUEST[url],$_REQUEST[desc] DELETE FROM user_wmslist WHERE idUser = (SELECT idUser FROM user WHERE username = :0 LIMIT 1) AND id = :1 LIMIT 1 $_SESSION[login_username],$_REQUEST[id_wms] Metacarta Metacarta http://labs.metacarta.com/wms/vmap0 basic 0.5 XML Sample - widget to be added to a toolbar --------------------------------------------- This widget must be added to a GeoExtToolbar widget .. code-block:: xslt W_GeoExtToolbar WLA_Sample XML Sample - widget needs a widget type service ------------------------------------------------ In services : .. code-block:: xslt WidgetService In datastore : .. code-block:: xslt DataStoreWidget WidgetService wmslayeradder methodManager In resource : .. code-block:: xslt res_wmslist DataStoreWidget WLA_Sample Mandatory Options ------------------- N/A Optional Options ------------------ :layers: Contains tags. :layers/layer: Must be in the tag. List of manually defined layers that are not te be securised by geoprisma. :layers/layer/name: Must be in a tag. Unique name for the layer, only use alphanumeric characters or the underscore. :layers/layer/text: Must be in a tag. Name to be shown in the list. :layers/layer/url: Must be in a tag. Url of the server containing the desired layer. :layers/layer/layer: Must be in a tag. List of the layers to get from the server. :layers/layer/opacity: Must be in a tag. Opacity of the layer. Number from 0 to 1. :mode: Specify the location where the favorites are stored. Can be cookie, curl or db. Default to cookie (not safe for user/pass) **== If mode is db (all mandatory) ==** :dsn: Database access informations. :user: The user for the wanted database :password: The password for the wanted database :select_query: The query required to obtain the list from the database :select_list: The variable list to obtain them in php. Seperated by commas. :insert_query: The query required to insert a new server in the database :insert_list: The variable list to obtain them in php. Seperated by commas. :delete_query: The query required to delete a server from the database :delete_list: The variable list to obtain them in php. Seperated by commas. **== If mode is curl (all mandatory) ==** :urlmode: The type of path that will be used. Can be relative or absolute. :url: The url of the page that will insert, delete or list the saved servers. :post: Contains a list of tags that will be posted to the specified url. Service Type -------------- wms Widget Action -------------- read