Work on moving configuration to yml files.

This commit is contained in:
David Molineus
2017-10-05 17:35:46 +02:00
parent 909288d4fc
commit ceb05bb08f
9 changed files with 508 additions and 351 deletions

View 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 }

View File

@@ -1,201 +1,202 @@
netzmacht.contao_leaflet_maps.amenities: parameters:
- 'administration' netzmacht.contao_leaflet_maps.amenities:
- 'advertising' - 'administration'
- 'alm' - 'advertising'
- 'animal_boarding' - 'alm'
- 'animal_breeding' - 'animal_boarding'
- 'animal_shelter' - 'animal_breeding'
- 'architect_office' - 'animal_shelter'
- 'arts_centre' - 'architect_office'
- 'artwork' - 'arts_centre'
- 'atm' - 'artwork'
- 'audiologist' - 'atm'
- 'baby_hatch' - 'audiologist'
- 'bank' - 'baby_hatch'
- 'bar' - 'bank'
- 'bbq' - 'bar'
- 'bench' - 'bbq'
- 'bicycle_parking' - 'bench'
- 'bicycle_rental' - 'bicycle_parking'
- 'bicycle_repair_station' - 'bicycle_rental'
- 'bicycle_trailer_sharing' - 'bicycle_repair_station'
- 'biergarten' - 'bicycle_trailer_sharing'
- 'bikeshed' - 'biergarten'
- 'boat_rental' - 'bikeshed'
- 'boat_sharing' - 'boat_rental'
- 'boat_storage' - 'boat_sharing'
- 'brothel' - 'boat_storage'
- 'bts' - 'brothel'
- 'bureau_de_change' - 'bts'
- 'bus_station' - 'bureau_de_change'
- 'cafe' - 'bus_station'
- 'canoe_hire' - 'cafe'
- 'car_rental' - 'canoe_hire'
- 'car_repair' - 'car_rental'
- 'car_sharing' - 'car_repair'
- 'car_wash' - 'car_sharing'
- 'casino' - 'car_wash'
- 'charging_station' - 'casino'
- 'childcare' - 'charging_station'
- 'cinema' - 'childcare'
- 'citymap_post' - 'cinema'
- 'clinic' - 'citymap_post'
- 'clock' - 'clinic'
- 'club' - 'clock'
- 'coast_guard' - 'club'
- 'coast_radar_station' - 'coast_guard'
- 'college' - 'coast_radar_station'
- 'community_center' - 'college'
- 'community_centre' - 'community_center'
- 'compressed_air' - 'community_centre'
- 'concert_hall' - 'compressed_air'
- 'conference_centre' - 'concert_hall'
- 'courthouse' - 'conference_centre'
- 'coworking_space' - 'courthouse'
- 'crematorium' - 'coworking_space'
- 'crucifix' - 'crematorium'
- 'crypt' - 'crucifix'
- 'customs' - 'crypt'
- 'dancing_school' - 'customs'
- 'dead_pub' - 'dancing_school'
- 'dentist' - 'dead_pub'
- 'disused' - 'dentist'
- 'dive_centre' - 'disused'
- 'doctors' - 'dive_centre'
- 'dog_bin' - 'doctors'
- 'dog_waste_bin' - 'dog_bin'
- 'dojo' - 'dog_waste_bin'
- 'drinking_water' - 'dojo'
- '_driving_school' - 'drinking_water'
- 'education' - '_driving_school'
- 'embassy' - 'education'
- 'emergency_phone' - 'embassy'
- 'emergency_service' - 'emergency_phone'
- 'events_venue' - 'emergency_service'
- 'ev_charging' - 'events_venue'
- 'exhibition_centre' - 'ev_charging'
- 'fast_food' - 'exhibition_centre'
- 'ferry_terminal' - 'fast_food'
- 'festival_grounds' - 'ferry_terminal'
- 'financial_advice' - 'festival_grounds'
- 'fire_hydrant' - 'financial_advice'
- 'fire_station' - 'fire_hydrant'
- 'first_aid' - 'fire_station'
- 'fish_spa' - 'first_aid'
- 'food_court' - 'fish_spa'
- 'fountain' - 'food_court'
- 'fuel' - 'fountain'
- 'gambling' - 'fuel'
- 'game_feeding' - 'gambling'
- 'garages' - 'game_feeding'
- 'grave_yard' - 'garages'
- 'grit_bin' - 'grave_yard'
- 'harbourmaster' - 'grit_bin'
- 'hospice' - 'harbourmaster'
- 'hospital' - 'hospice'
- 'hotel' - 'hospital'
- 'hunting_stand' - 'hotel'
- 'ice_cream' - 'hunting_stand'
- 'internet_cafe' - 'ice_cream'
- 'jobcentre' - 'internet_cafe'
- 'kindergarten' - 'jobcentre'
- 'kiosk' - 'kindergarten'
- 'kitchen' - 'kiosk'
- 'Kneippbecken' - 'kitchen'
- 'kneipp_water_cure' - 'Kneippbecken'
- 'language_school' - 'kneipp_water_cure'
- 'lavoir' - 'language_school'
- 'library' - 'lavoir'
- 'lifeboat_station' - 'library'
- 'life_ring' - 'lifeboat_station'
- 'loading_dock' - 'life_ring'
- 'love_hotel' - 'loading_dock'
- 'marae' - 'love_hotel'
- 'marketplace' - 'marae'
- 'milk_dispenser' - 'marketplace'
- 'mobile_library' - 'milk_dispenser'
- 'monastery' - 'mobile_library'
- 'money_transfer' - 'monastery'
- 'mortuary' - 'money_transfer'
- 'motorcycle_parking' - 'mortuary'
- 'motorcycle_rental' - 'motorcycle_parking'
- 'music_school' - 'motorcycle_rental'
- 'music_venue' - 'music_school'
- 'nameplate' - 'music_venue'
- 'nightclub' - 'nameplate'
- 'nursery' - 'nightclub'
- 'nursing_home' - 'nursery'
- 'park' - 'nursing_home'
- 'parking' - 'park'
- 'parking_entrance' - 'parking'
- 'parking_space' - 'parking_entrance'
- 'pharmacy' - 'parking_space'
- 'photo_booth' - 'pharmacy'
- 'place_of_worship' - 'photo_booth'
- 'planetarium' - 'place_of_worship'
- 'police' - 'planetarium'
- 'post_box' - 'police'
- 'post_office' - 'post_box'
- 'preschool' - 'post_office'
- 'printer' - 'preschool'
- 'prison' - 'printer'
- 'prison_camp' - 'prison'
- 'proposed' - 'prison_camp'
- 'pub' - 'proposed'
- 'public_bath' - 'pub'
- 'public_bookcase' - 'public_bath'
- 'public_building' - 'public_bookcase'
- 'public_hall' - 'public_building'
- 'ranger_station' - 'public_hall'
- 'recycling' - 'ranger_station'
- 'refugee_housing' - 'recycling'
- 'register_office' - 'refugee_housing'
- 'rescue_box' - 'register_office'
- 'rescue_station' - 'rescue_box'
- 'research_institute' - 'rescue_station'
- 'restaurant' - 'research_institute'
- 'retirement_home' - 'restaurant'
- 'sanatorium' - 'retirement_home'
- 'sanitary_dump_station' - 'sanatorium'
- 'sauna' - 'sanitary_dump_station'
- 'school' - 'sauna'
- 'scout_hut' - 'school'
- 'shelter' - 'scout_hut'
- 'shop' - 'shelter'
- 'shower' - 'shop'
- 'ski_school' - 'shower'
- 'smoking_area' - 'ski_school'
- 'social_centre' - 'smoking_area'
- 'social_facility' - 'social_centre'
- 'spa' - 'social_facility'
- 'stables' - 'spa'
- 'stripclub' - 'stables'
- 'studio' - 'stripclub'
- 'swimming_pool' - 'studio'
- 'swingerclub' - 'swimming_pool'
- 'table' - 'swingerclub'
- 'taxi' - 'table'
- 'telephone' - 'taxi'
- 'theatre' - 'telephone'
- 'ticket_booth' - 'theatre'
- 'ticket_validator' - 'ticket_booth'
- 'toilets' - 'ticket_validator'
- 'townhall' - 'toilets'
- 'trolley_bay' - 'townhall'
- 'university' - 'trolley_bay'
- 'vacuum_cleaner' - 'university'
- 'vehicle_inspection' - 'vacuum_cleaner'
- 'vending_machine' - 'vehicle_inspection'
- 'veterinary' - 'vending_machine'
- 'vivarium' - 'veterinary'
- 'wash_center' - 'vivarium'
- 'waste_basket' - 'wash_center'
- 'waste_disposal' - 'waste_basket'
- 'waste_transfer_station' - 'waste_disposal'
- 'water' - 'waste_transfer_station'
- 'watering_place' - 'water'
- 'water_point' - 'watering_place'
- 'weighbridge' - 'water_point'
- 'winery' - 'weighbridge'
- 'yacht_club' - 'winery'
- 'youth_centre' - 'yacht_club'
- 'youth_centre'

View 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'

View File

@@ -1,156 +1,157 @@
netzmacht.contao_leaflet_maps.providers: parameters:
OpenStreetMap: netzmacht.contao_leaflet_maps.providers:
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH'] OpenStreetMap:
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH']
OpenSeaMap: []
OpenTopoMap: []
Thunderforest:
variants:
- 'OpenCycleMap'
- 'Transport'
- 'TransportDark'
- 'SpinalMap'
- 'Landscape'
- 'Outdoors'
- 'Pioneer'
OpenMapSurfer:
variants: ['Roads', 'AdminBounds', 'Grayscale']
Hydda:
variants: ['Full', 'Base', 'RoadsAndLabels']
MapBox:
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider'
options:
key: 'tile_provider_key'
Stamen:
variants:
- 'Toner'
- 'TonerBackground'
- 'TonerHybrid'
- 'TonerLines'
- 'TonerLabels'
- 'TonerLite'
- 'Terrain'
- 'TerrainBackground'
- 'TopOSMRelief'
- 'TopOSMFeatures'
- 'Watercolor'
Esri:
variants:
- 'WorldStreetMap'
- 'DeLorme'
- 'WorldTopoMap'
- 'WorldImagery'
- 'WorldTerrain'
- 'WorldShadedRelief'
- 'WorldPhysical'
- 'OceanBasemap'
- 'NatGeoWorldMap'
- 'WorldGrayCanvas'
OpenWeatherMap: OpenSeaMap: []
variants:
- 'Clouds'
- 'CloudsClassic'
- 'Precipitation'
- 'PrecipitationClassic'
- 'Rain'
- 'RainClassic'
- 'Pressure'
- 'PressureContour'
- 'Wind'
- 'Temperature'
- 'Snow'
HERE: OpenTopoMap: []
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider'
variants:
- 'normalDay'
- 'normalDayCustom'
- 'normalDayGrey'
- 'normalDayMobile'
- 'normalDayGreyMobile'
- 'normalDayTransit'
- 'normalDayTransitMobile'
- 'normalNight'
- 'normalNightMobile'
- 'normalNightGrey'
- 'normalNightGreyMobile'
- 'basicMap'
- 'mapLabels'
- 'trafficFlow'
- 'carnavDayGrey'
- 'hybridDay'
- 'hybridDayMobile'
- 'pedestrianDay'
- 'pedestrianNight'
- 'satelliteDay'
- 'terrainDay'
- 'terrainDayMobile'
options:
appId: 'tile_provider_key'
appCode: 'tile_provider_code'
fields: ['tile_provider_key', 'tile_provider_code']
JusticeMap:
variants:
- 'income'
- 'americanIndian'
- 'asian'
- 'black'
- 'hispanic'
- 'multi'
- 'nonWhite'
- 'white'
- 'plurality'
FreeMapSK: []
MtbMap: []
CartoDB:
variants:
- 'Positron'
- 'PositronNoLabels'
- 'PositronOnlyLabels'
- 'DarkMatter'
- 'DarkMatterNoLabels'
- 'DarkMatterOnlyLabels'
HikeBike: Thunderforest:
variants: variants:
- 'HikeBike' - 'OpenCycleMap'
- 'HillShading' - 'Transport'
- 'TransportDark'
- 'SpinalMap'
- 'Landscape'
- 'Outdoors'
- 'Pioneer'
BasemapAT: OpenMapSurfer:
variants: variants: ['Roads', 'AdminBounds', 'Grayscale']
- 'basemap'
- 'grau'
- 'overlay'
- 'highdpi'
- 'orthofoto'
nlmaps: Hydda:
variants: variants: ['Full', 'Base', 'RoadsAndLabels']
- 'standaard'
- 'pastel'
- 'grijs'
- 'luchtfoto'
NASAGIBS:
variants:
- 'ModisTerraTrueColorCR'
- 'ModisTerraBands367CR'
- 'ViirsEarthAtNight2012'
- 'ModisTerraLSTDay'
- 'ModisTerraSnowCover'
- 'ModisTerraAOD'
- 'ModisTerraChlorophyll'
NLS: [] MapBox:
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider'
options:
key: 'tile_provider_key'
Stamen:
variants:
- 'Toner'
- 'TonerBackground'
- 'TonerHybrid'
- 'TonerLines'
- 'TonerLabels'
- 'TonerLite'
- 'Terrain'
- 'TerrainBackground'
- 'TopOSMRelief'
- 'TopOSMFeatures'
- 'Watercolor'
Esri:
variants:
- 'WorldStreetMap'
- 'DeLorme'
- 'WorldTopoMap'
- 'WorldImagery'
- 'WorldTerrain'
- 'WorldShadedRelief'
- 'WorldPhysical'
- 'OceanBasemap'
- 'NatGeoWorldMap'
- 'WorldGrayCanvas'
OpenWeatherMap:
variants:
- 'Clouds'
- 'CloudsClassic'
- 'Precipitation'
- 'PrecipitationClassic'
- 'Rain'
- 'RainClassic'
- 'Pressure'
- 'PressureContour'
- 'Wind'
- 'Temperature'
- 'Snow'
HERE:
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider'
variants:
- 'normalDay'
- 'normalDayCustom'
- 'normalDayGrey'
- 'normalDayMobile'
- 'normalDayGreyMobile'
- 'normalDayTransit'
- 'normalDayTransitMobile'
- 'normalNight'
- 'normalNightMobile'
- 'normalNightGrey'
- 'normalNightGreyMobile'
- 'basicMap'
- 'mapLabels'
- 'trafficFlow'
- 'carnavDayGrey'
- 'hybridDay'
- 'hybridDayMobile'
- 'pedestrianDay'
- 'pedestrianNight'
- 'satelliteDay'
- 'terrainDay'
- 'terrainDayMobile'
options:
appId: 'tile_provider_key'
appCode: 'tile_provider_code'
fields: ['tile_provider_key', 'tile_provider_code']
JusticeMap:
variants:
- 'income'
- 'americanIndian'
- 'asian'
- 'black'
- 'hispanic'
- 'multi'
- 'nonWhite'
- 'white'
- 'plurality'
FreeMapSK: []
MtbMap: []
CartoDB:
variants:
- 'Positron'
- 'PositronNoLabels'
- 'PositronOnlyLabels'
- 'DarkMatter'
- 'DarkMatterNoLabels'
- 'DarkMatterOnlyLabels'
HikeBike:
variants:
- 'HikeBike'
- 'HillShading'
BasemapAT:
variants:
- 'basemap'
- 'grau'
- 'overlay'
- 'highdpi'
- 'orthofoto'
nlmaps:
variants:
- 'standaard'
- 'pastel'
- 'grijs'
- 'luchtfoto'
NASAGIBS:
variants:
- 'ModisTerraTrueColorCR'
- 'ModisTerraBands367CR'
- 'ViirsEarthAtNight2012'
- 'ModisTerraLSTDay'
- 'ModisTerraSnowCover'
- 'ModisTerraAOD'
- 'ModisTerraChlorophyll'
NLS: []

View 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 }

View 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' }

View 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 }

View File

@@ -0,0 +1,3 @@
services:
netzmacht.contao_leaflet_maps.frontend.value_filter:
class: