mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 11:33:46 +01:00
Work on moving configuration to yml files.
This commit is contained in:
8
src/Resources/config/config.yml
Normal file
8
src/Resources/config/config.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
imports:
|
||||
- { resource: parameters/common.yml }
|
||||
- { resource: parameters/amenities.yml }
|
||||
- { resource: parameters/providers.yml }
|
||||
- { resource: services/encoders.yml }
|
||||
- { resource: services/mappers.yml }
|
||||
- { resource: services/services.yml }
|
||||
- { resource: services/listeners.yml }
|
||||
@@ -1,3 +1,4 @@
|
||||
parameters:
|
||||
netzmacht.contao_leaflet_maps.amenities:
|
||||
- 'administration'
|
||||
- 'advertising'
|
||||
|
||||
60
src/Resources/config/parameters/common.yml
Normal file
60
src/Resources/config/parameters/common.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
parameters:
|
||||
# leaflet controls.
|
||||
#
|
||||
# Supported leaflet control types. Register your type for the database driven definition here.
|
||||
netzmacht.contao_leaflet_maps.controls:
|
||||
- 'zoom'
|
||||
- 'layers'
|
||||
- 'scale'
|
||||
- 'attribution'
|
||||
- 'loading'
|
||||
- 'fullscreen'
|
||||
|
||||
# Leaflet icons.
|
||||
#
|
||||
# Supported leaflet icon types. Register you type for the database driven definition here.
|
||||
netzmacht.contao_leaflet_maps.icons:
|
||||
- 'image'
|
||||
- 'div'
|
||||
- 'extra'
|
||||
|
||||
# The style concept is not part of the LeafletJS library. Styles are extracted from the Path options. Instead
|
||||
# of defining the style for every vector again, manage them at one place.
|
||||
#
|
||||
# The goal is to provide different style strategies. For instance a random style chooser, one which uses a color
|
||||
# range and so one.
|
||||
netzmacht.contao_leaflet_maps.styles:
|
||||
- 'fixed'
|
||||
|
||||
# Leaflet vectors.
|
||||
#
|
||||
# Supported leaflet vector types. Register you type for the database driven definition here.
|
||||
netzmacht.contao_leaflet_maps.vectors:
|
||||
- 'polyline'
|
||||
- 'polygon'
|
||||
- 'multiPolyline'
|
||||
- 'multiPolygon'
|
||||
- 'rectangle'
|
||||
- 'circle'
|
||||
- 'circleMarker'
|
||||
|
||||
# When creating a GeoJSON feature of a map object a feature.properties.model object is passed.
|
||||
# Define the properties you always want to set.
|
||||
#
|
||||
# For more control you can subscribe the ConvertToGeoJsonEvent.
|
||||
#
|
||||
# The entry can be a string or an array. If an array is passed, the 2nd value is the type. Following types
|
||||
# are supported.
|
||||
# - array: Use deserialize before adding the value
|
||||
# - file: Thread value a uuid and find the path.
|
||||
# - files: Thread values as a list of file uuids and get an array of paths.
|
||||
netzmacht.contao_leaflet_maps.feature_model_properties:
|
||||
tl_leaflet_marker:
|
||||
- 'id'
|
||||
- 'title'
|
||||
- 'alias'
|
||||
|
||||
tl_leaflet_vector:
|
||||
- 'id'
|
||||
- 'title'
|
||||
- 'alias'
|
||||
@@ -1,3 +1,4 @@
|
||||
parameters:
|
||||
netzmacht.contao_leaflet_maps.providers:
|
||||
OpenStreetMap:
|
||||
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH']
|
||||
|
||||
40
src/Resources/config/services/encoders.yml
Normal file
40
src/Resources/config/services/encoders.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
netzmacht.contao_leaflet_maps.encoder.map:
|
||||
class: Netzmacht\LeafletPHP\Encoder\MapEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.control:
|
||||
class: Netzmacht\LeafletPHP\Encoder\ControlEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.group:
|
||||
class: Netzmacht\LeafletPHP\Encoder\GroupEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.raster:
|
||||
class: Netzmacht\LeafletPHP\Encoder\RasterEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.vector:
|
||||
class: Netzmacht\LeafletPHP\Encoder\VectorEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.ui:
|
||||
class: Netzmacht\LeafletPHP\Encoder\UIEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.type:
|
||||
class: Netzmacht\LeafletPHP\Encoder\TypeEncoder
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
|
||||
netzmacht.contao_leaflet_maps.encoder.subscriber:
|
||||
class: Netzmacht\Contao\Leaflet\Subscriber\EncoderSubscriber
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.encoder }
|
||||
11
src/Resources/config/services/filters.yml
Normal file
11
src/Resources/config/services/filters.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
# Filters can be passed to a data request to get only specific data from a layer.
|
||||
netzmacht.contao_leaflet_maps.filter.bbox:
|
||||
class: Netzmacht\Contao\Leaflet\Filter\BboxFilter
|
||||
tags:
|
||||
- { name: 'netzmacht.contao_leaflet_maps.filter', alias: 'bbox' }
|
||||
|
||||
netzmacht.contao_leaflet_maps.filter.distance:
|
||||
class: Netzmacht\Contao\Leaflet\Filter\DistanceFilter
|
||||
tags:
|
||||
- { name: 'netzmacht.contao_leaflet_maps.filter', alias: 'distance' }
|
||||
0
src/Resources/config/services/listeners.yml
Normal file
0
src/Resources/config/services/listeners.yml
Normal file
33
src/Resources/config/services/mappers.yml
Normal file
33
src/Resources/config/services/mappers.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
netzmacht.contao_leaflet_maps.mapper.popup:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\UI\PopupMapper
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.mapper }
|
||||
|
||||
netzmacht.contao_leaflet_maps.mapper.image_icon:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\Type\ImageIconMapper
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.mapper }
|
||||
|
||||
netzmacht.contao_leaflet_maps.mapper.div_icon:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\Type\DivIconMapper
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.mapper }
|
||||
|
||||
netzmacht.contao_leaflet_maps.mapper.extra_markers:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\Type\ExtraMarkersIconMapper
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.mapper }
|
||||
|
||||
netzmacht.contao_leaflet_maps.mapper.fixed_style:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\Style\FixedStyleMapper
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.mapper }
|
||||
|
||||
netzmacht.contao_leaflet_maps.mapper.marker:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\UI\MarkerMapper
|
||||
arguments:
|
||||
- '@netzmacht.contao_leaflet_maps.frontend.value_filter'
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet_maps.mapper }
|
||||
|
||||
3
src/Resources/config/services/services.yml
Normal file
3
src/Resources/config/services/services.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
services:
|
||||
netzmacht.contao_leaflet_maps.frontend.value_filter:
|
||||
class:
|
||||
Reference in New Issue
Block a user