composer create-project geo6/mapper
To enable authentication, add the following in config/autoload/local.php
:
'authentication' => [
'pdo' => [
'dsn' => 'pgsql:host=localhost;port=5432;dbname=...',
'username' => '...',
'password' => '...',
'table' => '...',
'field' => [
'identity' => '...',
'password' => '...',
],
'sql_get_roles' => '...',
'sql_get_details' => '...',
],
],
See Zend Expressive Authentication configuration for more information !
You can write your configuration files using any format compatible with Laminas\Config\Reader
(.ini
, .xml
, .json
, .yaml
, .php
).
The geocoding uses Geocoder PHP library. A list of providers is available here.
-
Install the new provider
composer install <geocoder-provider-package>
-
Add the new provider in
src/App/Handler/Geocoder/AddressHandler.php
(and insrc/App/Handler/Geocoder/ReverseHandler.php
if reverse geocoding is available) -
Then, declare the newly installed provider in
config/autoload/geocoder.global.php
file'<provider-name>' => [ 'reverse' => true|false, 'title' => '<provider-title>', ],
Parameter Type Description reverse
boolean Does the service provide reverse geocoding ? title
string Provider display title.
File config/autoload/epsg.global.php
'<projection-code>' => [
'name' => '<projection-name>',
'proj4' => '<projection-proj4-definition>',
],
Parameter | Type | Description |
---|---|---|
name |
string | Projection display name. |
proj4 |
string | PROJ.4 definition. See https://epsg.io/. |
Custom configuration is defined by "project". Those "projects" can be define by role, user or be available for everyone (= public).
To declare a new "project", just create a new folder in one of those directories:
config/application/public/
config/application/roles/<rolename>/
config/application/users/<username>/
You will then be able to access a "project" by adding ?c=<project-foldername>
in the URL.
If you want the same baselayers for every "project", you can configure your baselayers in a global config/application/baselayers.yaml
file.
---
title: <project-title>
description: <project-description>
map:
center:
[
<project-default-map-center-longitude>,
<project-default-map-center-latitude>,
]
zoom: <project-default-map-zoom>
Parameter | Type | Description |
---|---|---|
title |
string | Project display title. |
description |
string | Project description (available in "About" sidebar tab). |
map.center (optional) |
float[] | Project default map center coordinates (Longitude, Latitude). |
map.zoom (optional) |
float[] | Project default map zoom level. |
---
baselayers: <baselayer-1>
<baselayer-2>
...
Replace <baselayer-#>
by one of the following (XYZ, WMS, WMTS):
<baselayer-id>:
name: <baselayer-name>
url: <baselayer-url>
attributions:
- <baselayer-attribution-1>
- <baselayer-attribution-2>
- ...
maxZoom: <baselayer-max-zoom>
Parameter | Type | Description |
---|---|---|
name |
string | Baselayer display name. |
url |
string | Baselayer (service) URL. |
attributions (optional) |
string[] | Baselayer attribution(s). |
maxZoom (optional) |
integer | Baselayer maximum zoom level. |
<baselayer-id>:
mode: wms
name: <baselayer-name>
url: <baselayer-service-url>
layers: [<layer-1-id>, <layer-2-id>, ...]
attributions:
- <baselayer-attribution-1>
- <baselayer-attribution-2>
- ...
Parameter | Type | Description |
---|---|---|
name |
string | Baselayer display name. |
url |
string | Baselayer service URL. |
layers |
string[] | Baselayer service layers name. |
attributions (optional) |
string[] | Baselayer attribution(s). |
<baselayer-id>:
mode: wmts
name: <baselayer-name>
url: <baselayer-service-url>
layer: <layer-id>
attributions:
- <baselayer-attribution-1>
- <baselayer-attribution-2>
- ...
Parameter | Type | Description |
---|---|---|
name |
string | Baselayer display name. |
url |
string | Baselayer service URL. |
layer |
string[] | Baselayer service layer name. |
attributions (optional) |
string[] | Baselayer attribution(s). |
---
services:
- <service-1>
- <service-2>
...
Replace <service-#>
by one of the following (WMS, WMTS):
- type: wms
url: <service-url>
proxy: true|false
auth:
type: digest
username: <service-username>
password: <service-password>
default: []
maxZoom: <service-maxzoomlevel>
Parameter | Type | Description |
---|---|---|
url |
string | WMS service URL. |
proxy (optional) |
boolean | Use Mapper application as proxy to query the WMS service ? |
auth.type (optional) |
string | Type of authentication used by the WMS service (basic or digest). |
auth.username (optional) |
string | Username for the authentication. |
auth.password (optional) |
string | Password for the authentication. |
default (optional) |
string[] | List of layers displayed by default. |
maxZoom (optional) |
integer | WMS service maximum zoom level. |
- type: wmts
url: <service-url>
Parameter | Type | Description |
---|---|---|
url |
string | WMS service URL. |
---
files:
- type: <file-type>
path: <file-path>
- ...
Parameter | Type | Description |
---|---|---|
type |
string | csv , geojson , gpx , or kml . |
path |
string | Path of a file or a directory. |