diff --git a/Configuration/NodeTypes.Map.yaml b/Configuration/NodeTypes.Map.yaml index 4279953..2cbf760 100644 --- a/Configuration/NodeTypes.Map.yaml +++ b/Configuration/NodeTypes.Map.yaml @@ -6,6 +6,7 @@ # 'WebExcess.OpenStreetMap:Map.LatLon.Visible': true # 'WebExcess.OpenStreetMap:Map.LatLon.Editable': true # 'WebExcess.OpenStreetMap:Map.Style': true +# 'WebExcess.OpenStreetMap:Map.MaxZoom': true ui: label: 'OpenStreetMap' icon: 'icon-map-marked-alt' diff --git a/Configuration/NodeTypes.Mixins.yaml b/Configuration/NodeTypes.Mixins.yaml index 05dae09..51321d1 100644 --- a/Configuration/NodeTypes.Mixins.yaml +++ b/Configuration/NodeTypes.Mixins.yaml @@ -81,3 +81,70 @@ label: 'Grayscale' dark: label: 'Dark' + +'WebExcess.OpenStreetMap:Map.MaxZoom': + abstract: true + properties: + maxZoom: + type: integer + ui: + label: 'Maximum Zoom' + help: + message: 'Initial zoom value. The larger the value, the further one can zoom in.' + reloadPageIfChanged: true + inspector: + group: 'map' + editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor' + editorOptions: + allowEmpty: true + # not all maps allow all zoom levels + values: + 0: + label: '0 (1:500 million)' + disabled: true + 1: + label: '1 (1:250 million)' + disabled: true + 2: + label: '2 (1:150 million)' + disabled: true + 3: + label: '3 (1:70 million)' + disabled: true + 4: + label: '4 (1:35 million)' + disabled: true + 5: + label: '5 (1:15 million)' + disabled: true + 6: + label: '6 (1:10 million)' + 7: + label: '7 (1:4 million)' + 8: + label: '8 (1:2 million)' + 9: + label: '9 (1:1 million)' + 10: + label: '10 (1:500 thousand)' + 11: + label: '11 (1:250 thousand)' + 12: + label: '12 (1:150 thousand)' + 13: + label: '13 (1:70 thousand)' + 14: + label: '14 (1:35 thousand)' + 15: + label: '15 (1:15 thousand)' + 16: + label: '16 (1:8 thousand)' + 17: + label: '17 (1:4 thousand)' + 18: + label: '18 (1:2 thousand)' + 19: + label: '19 (1:1 thousand)' + 20: + label: '20 (1:5 hundred)' + disabled: true diff --git a/Documentation/editor-maxzoom.png b/Documentation/editor-maxzoom.png new file mode 100644 index 0000000..adeda09 Binary files /dev/null and b/Documentation/editor-maxzoom.png differ diff --git a/README.md b/README.md index b4966c3..555ae4a 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ It's best practice to include them in your custom builds and remove the default |
# default
| ![Editor Default](Documentation/editor-default.png?raw=true "Editor Default") | |
'WebExcess.OpenStreetMap:Map':
superTypes:
'WebExcess.OpenStreetMap:Map.LatLon.Editable': true
| ![Editor LatLon](Documentation/editor-latlon.png?raw=true "Editor LatLon") | |
'WebExcess.OpenStreetMap:Map':
superTypes:
'WebExcess.OpenStreetMap:Map.Style': true
| ![Editor Style](Documentation/editor-style.png?raw=true "Editor Style") | +|
'WebExcess.OpenStreetMap:Map':
superTypes:
'WebExcess.OpenStreetMap:Map.MaxZoom': true
| ![Editor Maximum Zoom](Documentation/editor-maxzoom.png?raw=true "Editor Maximum Zoom") | ## Default Settings diff --git a/Resources/Private/Fusion/NodeTypes/Map.fusion b/Resources/Private/Fusion/NodeTypes/Map.fusion index 9f1ba80..66a27dc 100644 --- a/Resources/Private/Fusion/NodeTypes/Map.fusion +++ b/Resources/Private/Fusion/NodeTypes/Map.fusion @@ -3,5 +3,6 @@ prototype(WebExcess.OpenStreetMap:Map) < prototype(Neos.Neos:ContentComponent) { lat = ${q(node).property('lat')} lon = ${q(node).property('lon')} style = ${q(node).property('style')} + maxZoom = ${q(node).property('maxZoom')} } }