Error: Failed to load processor TOC
No macro or processor named 'TOC' found

Plugins concerning query, search, selection and results

Export

Description

Plugin to export query results to various formats.

It adds export radio buttons to query result display. Currently implemented format: XLS, PDF, CSV, SHP (experimental).

How to use

Enable the plugin by adding a line in config_XXXXX.xml file:

<pmapper>
    <ini>
        <pmapper>
....
            <plugins>export</plugins>
....
        </pmapper>
    </ini>
</pmapper>

Define the formats you want to offer for export by adding in config_XXXXX.xml file:

<pmapper>
    <ini>
....
        <pluginsConfig>
....
            <export>
                <formats>XLS</formats>
                <formats>CSV</formats>
                <formats>PDF</formats>
                <formats>SHP</formats>
            </export>
....
        </pluginsConfig>
    </ini>
</pmapper>

Additional configuration is available for some formats:

<pmapper>
    <ini>
....
        <pluginsConfig>
....
            <export>
....
                <!-- PDF formatting: -->
                <PDF>
                    <defaultFont>FreeSans</defaultFont>
                    <defaultFontSize>9</defaultFontSize>
                    <!-- <headerFont>FreeSans</headerFont> -->
                    <headerFontSize>9</headerFontSize>
                    <headerFontStyle>BI</headerFontStyle>
                    <!-- <layerrFont>FreeSans</layerFont> -->
                    <layerFontSize>11</layerFontSize>
                    <layerFontStyle>UB</layerFontStyle>
                </PDF>
            </export>
....
        </pluginsConfig>
    </ini>
</pmapper>

Dependencies

Export to XLS requires the installation of the PEAR modules Spreadsheet_Excel_Writer and OLE (see here for details).


Query Editor

Description

The Query Editor plugin is a form witch permit to construct attribute query (syntax is near SQL). Layer and fields names are used in the UI and permit user to execute free queries that are not configured in search.xml.

QueryEditor plugin: add image

How to use

Enable the plugin by adding a line in config_XXXXX.xml file:

<pmapper>
    <ini>
        <pmapper>
....
            <plugins>queryeditor</plugins>
....
        </pmapper>
    </ini>
</pmapper>

Add the tool button to the interface in /config/XXXXX/js_config.php file:

PM.buttonsDefault = {
    .....
    buttons: [
	.....
	{tool:'queryeditor', name:'QueryEditor', run:'PM.Plugin.QueryEditor.openDlg'},
	.....
    ]
}

Add an image to use for the button in the corresponding theme directory (an example is in the install/images-buttons-default plugin subdirectory).

Add default translation from plugins/queryeditor/install/language_en-part.php to incphp/locale/language_en.php. You can add translations for other language (French is provided) by doing the same.

Configure the plugin by adding a line in config_XXXXX.xml file:

<pmapper>
    .....
    <ini>
        .....
        <pluginsConfig>
            .....
	    <queryeditor>
	        <layersType>3</layersType>
		<queryableLayers>
		    <queryableLayer>
		        <name>countries</name>
			<description>My country layer description</description>
		    </queryableLayer>
		    <queryableLayer>
		        <name>cities10000eu</name>
			<description>My cities level description</description>
		    </queryableLayer>
		</queryableLayers>
		<dlgType>dynwin</dlgType>
	    </queryeditor>
        </pluginsConfig>
    </ini>
</pmapper>

Parameters:

  • layersType: indicate witch layers/groups are available for attribute query in the query editor
    • 1 = all non raster layers
    • 2 = pre-defined list of layers (see queryableLayers parameter)
    • 3 = checked and non raster (default value)
    • 4 = checked and visible (depending on scale) and non raster
  • queryableLayers: list of layers available in the query editor (only used if layersType = 2)

Dependencies

  • plugins/common/commonforms.css (and gif associated files if needed): inspired of cmxform, but no js associated
  • plugins/common/common.js
  • plugins/common/easyincludes.php
  • plugins/common/groupsAndLayers.php

TO DO

  • try to find a generic way to show the first 5 different values for the chosen attribute field
  • change operator organization in the window
  • try to see with Armin if/how it is possible to re-use part of search.php (getSearchParameters functions)
  • maybe use the custom styles (search "// custom CSS for this window" in queryeditor.php)

Search Tool

Description

It just allow to use a button in user interface witch show the search form layer, instead of having the form always displayed in window.

How to use

Enable the plugin by adding a line in config_XXXXX.xml file:

<pmapper>
    <ini>
        <pmapper>
....
            <plugins>searchtool</plugins>
....
        </pmapper>
    </ini>
</pmapper>

Add the search tool button to the interface in /config/XXXXX/js_config.php file:

PM.buttonsDefault = {
    .....
    buttons: [
	.....
	{tool:'searchtool', name:'Search', run:'PM.Plugin.SearchTool.click'},
	.....
    ]
}

Add an image to use for the button in the corresponding theme directory (an example is in the install plugin subdirectory)..

Configure the plugin by adding a line in config_XXXXX.xml file:

<pmapper>
    .....
    <ini>
        .....
        <pluginsConfig>
            .....
            <searchtool>
                <type>dynwin</type>
                <style>block</style>
                <container>#uiLayoutCenter</container>
                <dlgOptions>
                    <width>200</width>
                    <height>150</height>
                    <left>300</left>
                    <top>100</top>
                    <resizeable>false</resizeable>
                    <newsize>true</newsize>
                    <container>pmSearchToolContainer</container>
                    <name>Search</name>
                </dlgOptions>
            </searchtool>
        </pluginsConfig>
    </ini>
</pmapper>

Parameters:

  • type: dialog type to use
    • dynwin = a dynamic window will be automatically created
    • 0 = see 'container' parameternding on scale) and non raster
  • style:
    • block
    • inline
  • container: ID (with the '#') of the element that will contain the search form
  • dlgOptions: options of the dynamic window

Maybe you will need to modify your CSS properties, like for instance :

#mapToolArea {
	height: 25px;
	text-align: left;
}
.pm-searchcont {
	position: relative;
}

TO DO

add image for button

Attachments