When installing Cartoweb, the administrator of the application may want to adapt it to the environnement use. This can be easily done using configuration parameters.
Some are required and Cartoweb won't correctly work if they're not set. Others are optional but could hardly change the application behavior.
You'll also find specific config parameters in the plugins related chapters of this documentation.
Common options for both client and server. These parameters are
available in client_conf/client.ini for client and
server_conf/server.ini for server.
- profile = development|production|custom: Current profile: the developer profile has no cache activated, and uses WSDL. Development profile has all caches activated for best performances. Setting this parameter to development or production will override some parameters in the configuration. The custom profile means the parameters about caching and other are not overrided.
- useWsdl = true|false: if true, WSDL will be used for sending SOAP requests. This will add some processing time but ensures that SOAP requests are well-structured.
Cache options. See Section 5.6, “Caches Configuration”.
Developer options. See Section 4.5, “Developer Specific Configuration”.
CartoServer access configuration:
- cartoserverDirectAccess = true|false: toggles between SOAP and direct modes. Direct access gives enhanced performances, but is only available if CartoServer runs on the same server as CartoClient.
- cartoclientUrl = "url" : base URL of the cartoclient-
- cartoserverUrl = "url" : base URL of the cartoserver (i.e. path
containing the
cartoserver.wsdl.phpfile.
Mapfile configuration:
- mapId = string
- initialMapStateId = string. Tells what
initialMapStateto use when creating a new CartoWeb session (see also Section 4.3.3.3, “Initial Mapstates”).Tip
initialMapStateIdmay be determined using several means. By order of priority:- URLs (using GET parameter
initialState) - PHP environment variables. Place
$_ENV['CW3_INITIAL_MAP_STATE_ID'] = 'foobar';
in your PHP code before calling CartoWeb. - client.ini
- If no
initialMapStateIdcan be determined, CartoWeb use firstinitialMapStateavailable.
- URLs (using GET parameter
Session handling:
- sessionNameSuffix = string. Optional suffix used to distinguish CartoClient sessions parts for a given user. In most cases it is not necessary but may be needed when using, for instance, "sub-projects". This string is an ulimited comma-separated list of
type:valuecouples. Three types are available:For instance:str: a constant stringconf: uses value of one of the currentclient.iniconfiguration parametersenv: uses value of given PHP environment variable, if set.
sessionNameSuffix = "str:toto, conf:profile, env:myEnvVar" sessionNameSuffix = "str:foo, str:bar" sessionNameSuffix = "env:CW3_APP_ID"
Tools configuration:
- initialTool: indicates which tool is activated when in initial state. If not specified, the first tool in the toolbar is activated. Possible values are: zoomin, zoomout, pan, query, distance, surface.
Project handling configuration:
- showProjectChooser = true|false: Shows a drop-down list for selecting the active project.
- availableProjects = list: List of the project to show in the drop down list. If not set, all projects found will be used.
Plugins configuration:
- loadPlugins = list: list of client plugins to load in addition
to the core plugins. Note that most client plugins also have a
corresponding server plugin that must be loaded on the server side.
See Section 4.3.3.2, “
<myMap>.ini”.
Internationalization:
- I18nClass is now deprecated See Chapter 15, Internationalization for a description of the internationalization options and the corresponding configurations.
- defaultLang = string: default language, possible values are the usual ISO locale codes (en, fr, de ...)
- langList = list: list of usable languages. Used to order and restrict the available languages. In case you have many languages in directory <cartoweb_home>/locale/ and do not want to use them all in your project, you may use this parameter to specify a list of languages to use. The order in which you input the languages codes will be used to display the languages links in the interface.The exemple above restricts the availablelanguages to it, de and fr. They will be displayed in that order in the interface languages list.
This page describes the configuration options of the CartoServer.
There is a global configuration file (server.ini)
directly in the server_conf folder. Then all
specific configurations are stored in individual folders. Each
configuration contains:
- a Mapserver mapfile (
myMap.map), - its annexes (symbols, fonts, images, data...),
- a main configuration file (
myMap.ini) that must have the same name as the.map - smaller configuration files for the plugins.
By default, CartoWeb comes with a fully functional
test folder, that includes the necessary
geometrical datas and allows one to run an out of the box demo.
- imageUrl = string: Path where cartoserver generated images can be accessed.
- reverseProxyUrl = string: The url of the reverse proxy, if used.
The CartoServer has the ability to contains several different maps. These maps are represented by the mapserver mapfile, the CartoWeb configuration file for the map and each plugins configuration.
The file that contain the configuration information related to a
map, is located in the same directory as the mapfile, but has a
.ini extension. These files are in the directory
server_conf/<myMap>.
- mapInfo.loadPlugins = list: list of server plugins to load
in addition to the core plugins. Note that most server plugins
also have a corresponding client plugin that must be loaded on
the client side. See Section 4.2, “
client.ini”. - mapInfo.initialMapStates.[...]: See Section 4.3.3.3, “Initial Mapstates”.
Initial map states set the initial aspects of the layers selection interface when starting using CartoClient: (un)folded nodes, selected layers... Some of these properties are not modifiable in the layers selection interface (hidden layers for instance) and thus stay unchanged throughout the session.
Several initial map states can be created in myMap.ini
, but at least one must be present. Each one is identified
by a unique initialMapStateId. The choice to activate one or another
is done client-side in client_conf/client.ini.
Available properties and syntax for layers in "initial map states" are:
- mapInfo.initialMapStates.initialMapStateId.layers.layerId. selected = true|false: if true, layer is initially selected.
- mapInfo.initialMapStates.initialMapStateId.layers.layerId. unfolded = true|false: if true, the layerGroup is represented as an unfolded node (children layers are visible).
- mapInfo.initialMapStates.initialMapStateId.layers.layerId. hidden = true|false: if true, this layer and its children are not shown in the layers list (but are still displayed on the map if they're activated).
- mapInfo.initialMapStates.initialMapStateId.layers.layerId. frozen = true|false: if true, this layer (and its children as well) is listed in tree but without checkbox. Its selection status (defined by "selected" property) thus cannot be changed.
Example of Initial MapState:
mapInfo.initialMapStates.default.layers.polygon.selected = true mapInfo.initialMapStates.default.layers.point.hidden = true ... mapInfo.initialMapStates.map25.layers.polygon.selected = true mapInfo.initialMapStates.map25.layers.polygon.unfolded = true
Each plugin may have a configuration file associated with it. It is
located in the same directory as the myMap.map and
myMap.ini. They have the same name as the plugin and
ends with .ini extension. For instance, the
layers plugin has a configuration file named
layers.ini.
All plugins configuration files are described in the next sections of this chapter.
Every plugin that provides tools icons can be configured for:
To modify the toolbar icons sequence, update the tools weight values. Icons with the lowest weights are placed first in the toolbar. Parameters naming convention is to concatenate the 'weight' prefix to the capitalized-first-lettered tool name as in weightDistance. For two-words tool names (eg. 'zoom_in'), each word has its first letter capitalized and the '_' (underscore) is removed. For instance:
weightZoomIn = 10
Default weights value are :
- weightZoomIn: 10
- weightZoomOut: 11
- weightPan: 12
- weightQuery: 40
- weightOutlinePoint: 70
- weightOutlineLine: 71
- weightOutlineRectangle: 72
- weightOutlinePoly: 73
- weightDistance: 80
- weightSurface: 81
CartoWeb offers the possibility to display tools icons in separated locations of its interface. For instance browsing icons may be displayed in the general toolbar whereas outline pictos may only appear in a dedicated folder. To do so, simply add an integer group index for each tool in matching plugin configuration file. For instance:
groupDistance = 2
By default, all tools icons are affected to group 1. Note that the parameters naming convention is the same than for weight parameters (see Section 4.4.1, “Ordering Tools Icons”), only substituting the 'group' prefix to the 'weight' one.
It is also possible to specify a global plugin group index that will be applied to all the given plugin tools if no individual group index has been set. To do so, use the groupPlugin in the matching plugin configuration file as follows:
groupPlugin = 3
To take benefit of the tools groups, update the main CartoWeb template file templates/cartoclient.tpl by including the toolbar.tpl template at the correct places with the correct group indexes as follows:
{include file="toolbar.tpl" group=2}
For more information about templates writing, see Chapter 16, Templating.
Some configuration parameters can be activated to retrieve more display information targetted to the developers, like special timing messages, or setting the Php configuration to display notices on the page. These configuration options are described below.
Warning
These parameters will be overrided by the
profile parameter (See Section 4.1, “Common client.ini and
server.ini Options”).
These parameters are available in
client_conf/client.ini for client and
server_conf/server.ini for server.
- showDevelMessages = true|false: Shows developer messages
- developerIniConfig = true|false: Sets ini parameters useful during development
- allowTests = true|false: allows tests running through Web interface