Implement custom route for data request to prevent partial rendering of the page and it's possible issues (f.e. form captcha changes) (Close #49).

This commit is contained in:
David Molineus
2018-10-29 16:02:50 +01:00
parent 7ec2ee0d96
commit 0ba725ed38
14 changed files with 321 additions and 14 deletions

View File

@@ -32,6 +32,7 @@ services:
class: Netzmacht\Contao\Leaflet\Mapper\Layer\MarkersLayerMapper
arguments:
- '@netzmacht.contao_toolkit.repository_manager'
- '@router'
tags:
- { name: netzmacht.contao_leaflet.mapper }
@@ -46,6 +47,7 @@ services:
class: Netzmacht\Contao\Leaflet\Mapper\Layer\VectorsLayerMapper
arguments:
- '@netzmacht.contao_toolkit.repository_manager'
- '@router'
tags:
- { name: netzmacht.contao_leaflet.mapper }

View File

@@ -0,0 +1,11 @@
leaflet_layer:
path: /layer/{layerId}
controller: Netzmacht\Contao\Leaflet\Frontend\Action\LayerDataAction
defaults:
_leaflet_scope: page
_format: geojson
_scope: frontend
requirements:
_format: geojson
context: \w+
contextId: \d+

View File

@@ -122,3 +122,12 @@ services:
arguments:
- '@netzmacht.contao_leaflet.filter_factory'
- '%kernel.debug%'
Netzmacht\Contao\Leaflet\Frontend\PageIdDeterminator:
tags:
- { name: Netzmacht\Contao\PageContext\Request\PageIdDeterminator }
Netzmacht\Contao\Leaflet\Frontend\Action\LayerDataAction:
arguments:
- '@netzmacht.contao_leaflet.map.provider'
- '@netzmacht.contao_leaflet.filter_factory'

File diff suppressed because one or more lines are too long