Skip to content

Commit

Permalink
Merge pull request #21 from punktDeForks/feature/expose-max-zoom-for-…
Browse files Browse the repository at this point in the history
…editing

FEATURE: expose max zoom option for editing
  • Loading branch information
sbruggmann authored Aug 9, 2021
2 parents 19195ca + bb70451 commit 107e55f
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions Configuration/NodeTypes.Map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
67 changes: 67 additions & 0 deletions Configuration/NodeTypes.Mixins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file added Documentation/editor-maxzoom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ It's best practice to include them in your custom builds and remove the default
| <pre># default</pre> | ![Editor Default](Documentation/editor-default.png?raw=true "Editor Default") |
| <pre>'WebExcess.OpenStreetMap:Map':<br> superTypes:<br> 'WebExcess.OpenStreetMap:Map.LatLon.Editable': true</pre> | ![Editor LatLon](Documentation/editor-latlon.png?raw=true "Editor LatLon") |
| <pre>'WebExcess.OpenStreetMap:Map':<br> superTypes:<br> 'WebExcess.OpenStreetMap:Map.Style': true</pre> | ![Editor Style](Documentation/editor-style.png?raw=true "Editor Style") |
| <pre>'WebExcess.OpenStreetMap:Map':<br> superTypes:<br> 'WebExcess.OpenStreetMap:Map.MaxZoom': true</pre> | ![Editor Maximum Zoom](Documentation/editor-maxzoom.png?raw=true "Editor Maximum Zoom") |


## Default Settings
Expand Down
1 change: 1 addition & 0 deletions Resources/Private/Fusion/NodeTypes/Map.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
}
}

0 comments on commit 107e55f

Please sign in to comment.