Skip to content

Commit

Permalink
Merge pull request #127 from mapbender/feature/demo-applications-cust…
Browse files Browse the repository at this point in the history
…om-style

demo applications: improved mobile application, region info for user & basic
  • Loading branch information
Phocacius authored Jun 6, 2024
2 parents bc034de + 4c637e6 commit 87164a7
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 72 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Update bundled composer version to [2.6.3](https://github.com/composer/composer/releases/tag/2.6.3)
- Removed OpenLayers 2 support (deprecated since v3.2). All applications that were still using the legacy engine will
automatically use the recent OpenLayers 9 implementation ([PR#1483](https://github.com/mapbender/mapbender/pull/1483))
- Improve demo applications ([PR#116](https://github.com/mapbender/mapbender-starter/pull/116))
- Improve demo applications ([PR#116](https://github.com/mapbender/mapbender-starter/pull/116)) ([PR#127](https://github.com/mapbender/mapbender-starter/pull/127))
- Fixed build generated by `composer build` ([PR#120](https://github.com/mapbender/mapbender-starter/pull/120))
- Added docker integration ([PR#125](https://github.com/mapbender/mapbender-starter/pull/125))

Expand Down
9 changes: 1 addition & 8 deletions application/bin/ComposerBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,7 @@ public static function updateEpsgCodes()
public static function importExampleApplications()
{
static::printStatus("Import example mapbender applications");
$fixturePath = 'mapbender/src/Mapbender/CoreBundle/DataFixtures/ORM/Application/LoadApplicationData.php';
if (@\file_exists(dirname(__FILE__) . "/../$fixturePath")) {
// Mapbender <= 3.2.5
\passthru("php bin/console doctrine:fixtures:load --fixtures=$fixturePath --append");
} else {
// Prefer console command on Mapbender >= 3.2.6
\passthru("php bin/console mapbender:application:import " . dirname(__FILE__) . '/../config/applications');
}
\passthru("php bin/console mapbender:application:import " . dirname(__FILE__) . '/../config/applications');
}

/**
Expand Down
160 changes: 113 additions & 47 deletions application/config/applications/mapbender_mobile.yaml
Original file line number Diff line number Diff line change
@@ -1,80 +1,104 @@
parameters:
applications:
mapbender_mobile:
title: Mobile demo
title: Mapbender Mobile Demo
screenshot: screenshot.png
description: Simple application using mobile template
description: Mapbender application using mobile template
published: true
template: 'Mapbender\MobileBundle\Template\Mobile'
custom_css: |
.toolBar.bottom {
border-top: 2px solid #0066BA;
}
.toolBar {
color: #0066BA;
}
mobilePane .contentTitle {
flex: 0;
font-size: 142%;
border-bottom: solid 2px #0066BA;
}
.popup {
border-color: #EEE9E9;
border: 1px #EEE9E9;
border-radius: 10px;
}
.popupHead {
border-bottom: solid 1px #747577;
margin: 0 20px 20px 20px;
padding: 20px 0 10px 0;
}
custom_css: null
layersets:
main:
themes:
selected: true
mapbender_users:
class: Mapbender\WmsBundle\Entity\WmsInstance
title: Mapbender Users
url: https://wms.wheregroup.com/cgi-bin/mapbender_user.xml
version: 1.3.0
layers:
10: { name: Mapbender_User, title : User, visible: true, legendurl: https://wms.wheregroup.com/cgi-bin/mapbender_user.xml?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=Mapbender_User&format=image/png&STYLE=default }
22: { name: Mapbender_Names, title : Name, visible: true, queryable: true}
4: { name: Mapbender_User, title : User, visible: true, legendurl: https://wms.wheregroup.com/cgi-bin/mapbender_user.xml?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=Mapbender_User&format=image/png&STYLE=default }
5: { name: Mapbender_Names, title : Name, visible: true, queryable: true}
info_format: text/html
visible: true
format: image/png
transparent: true
tiled: false
opacity: 100
isBaseSource: false
toggle: true
fossgis:
class: Mapbender\WmsBundle\Entity\WmsInstance
title: FOSSGIS Konferenzen
url: https://wms.wheregroup.com/cgi-bin/fossgis.xml
version: 1.3.0
layers:
6: { name: FOSSGIS, title : FOSSGIS Konferenz-Standorte, visible: true, queryable: true, legendurl: https://wms.wheregroup.com/cgi-bin/fossgis.xml?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=fossgis&format=image/png&STYLE=default }
info_format: text/html
allowtoggle: false
visible: true
format: image/png
transparent: true
tiled: false
opacity: 100
isBaseSource: false
toggle: false
foss4g:
class: Mapbender\WmsBundle\Entity\WmsInstance
title: FOSS4G Conferences
url: https://wms.wheregroup.com/cgi-bin/foss4g.xml
version: 1.3.0
layers:
6: { name: FOSS4G, title : FOSS4G Conference Locations, visible: true, queryable: true, legendurl: https://wms.wheregroup.com/cgi-bin/foss4g.xml?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=foss4g&format=image/png&STYLE=default }
info_format: text/html
visible: false
format: image/png
transparent: true
tiled: false
opacity: 100
isBaseSource: false
toggle: false
background themes:
selected: true
osm:
class: Mapbender\WmsBundle\Entity\WmsInstance
title: OSM Demo
url: https://osm-demo.wheregroup.com/service
version: 1.3.0
layers:
30: { name: osm, title : OSM Demo WhereGroup, visible: true }
12: { name: osm, title : OSM Demo WhereGroup, visible: true }
info_format: text/html
visible: true
format: image/png
transparent: true
tiled: true
opacity: 100
isBaseSource: true
osm_2:
osm-transparent:
class: Mapbender\WmsBundle\Entity\WmsInstance
title: OSM Demo (with Opacity)
title: OSM Demo
url: https://osm-demo.wheregroup.com/service
version: 1.3.0
layers:
30: { name: osm, title : OSM Demo WhereGroup, visible: true }
12: { name: osm, title : OSM Demo WhereGroup, visible: true }
info_format: text/html
visible: false
format: image/png
transparent: true
tiled: false
opacity: 30
tiled: true
opacity: 60
isBaseSource: true
osm-greyscale:
class: Mapbender\WmsBundle\Entity\WmsInstance
title: OSM Demo
url: https://osm-demo.wheregroup.com/service
version: 1.3.0
layers:
13: { name: osm-grey, title : OSM Demo WhereGroup (greyscale), visible: true }
info_format: text/html
visible: false
format: image/png
transparent: true
tiled: true
opacity: 100
isBaseSource: true
elements:
footer:
Expand Down Expand Up @@ -124,6 +148,7 @@ parameters:
label: false
icon: iconHelp
target: help
screenType: desktop

about-mapbender-button:
title: mb.core.aboutdialog.tag.about
Expand All @@ -139,17 +164,44 @@ parameters:
content:
map:
class: Mapbender\CoreBundle\Element\Map
layersets: [main]
layersets: [themes,background themes]
srs: EPSG:3857
extents:
start: [772933.16,6566826.23,806786.66,6582317.62]
max: [-20037508.34278924,-20037508.34278924,20037508.34278924,20037508.34278924]
scales: [50000000,25000000,10000000,5000000,1000000,500000,100000,50000,25000,10000,7500,5000,2500,1000,500]
otherSrs: ["EPSG:25832","EPSG:25833","EPSG:31466","EPSG:31467","EPSG:4326"]

simplesearch:
title: mb.core.simplesearch.class.title
placeholder: mb.demoapps.search
class: Mapbender\CoreBundle\Element\SimpleSearch
target: map
anchor: right-top
query_url: https://osm-photon-search.wheregroup.com/search/api?limit=20&lat=50.7163&lon=7.1366&osm_tag=!railway&osm_tag=!highway:elevator&osm_tag=!tourism&osm_tag=!amenity
query_key: q
query_format: '%s'
token_regex: '[^a-zA-Z0-9äöüÄÖÜß]'
token_regex_in: '([a-zA-ZäöüÄÖÜß]{3,})'
token_regex_out: '$1*'
collection_path: features
label_attribute: '${properties.name} ${properties.street} ${properties.housenumber} ${properties.city} ${properties.country}'
geom_attribute: geometry
sourceSrs: 'EPSG:4326'
geom_format: GeoJSON
delay: 300
query_ws_replace: null
result:
buffer: ~
minscale: 500
maxscale: 5000
icon_url: '/bundles/mapbendercore/image/pin_red.png'
icon_offset: '-6,-32'

zoombar:
class: Mapbender\CoreBundle\Element\ZoomBar
target: map
components: ["rotation", "zoom_in_out", "zoom_max"]
components: ["zoom_in_out", "zoom_max","zoom_home"]
anchor: right-bottom
draggable: false

Expand Down Expand Up @@ -203,19 +255,33 @@ parameters:
https://doc.mapbender.org</a>
</p>"
classes: html-element-inline
screenType: desktop

basesourceswitcher:
title: mb.core.basesourceswitcher.class.title
tooltip: mb.core.basesourceswitcher.class.title
class: Mapbender\CoreBundle\Element\BaseSourceSwitcher
target: map
instancesets:
is1:
title: "OSM Demo (with opacity)"
group: ~
instances: [osm_2]
is2:
title: "OSM Demo"
group: ~
instances: [osm]
1-basesourceswitcher:
title: OSM (color)
group: null
instances:
- osm
2-basesourceswitcher:
title: OSM (greyscale)
group: null
instances:
- osm-greyscale
3-basesourceswitcher:
title: OSM (transparent)
group: null
instances:
- osm-transparent
4-basesourceswitcher:
title: mb.demoapps.noBackground
group: null
instances: []

html-about-mapbender:
title: mb.core.aboutdialog.tag.about
Expand All @@ -233,4 +299,4 @@ parameters:
<p>
<a href=\"https://www.osgeo.org\" target=\"_blank\">https://www.osgeo.org</a>
</p>
</p>"
</p>"
23 changes: 20 additions & 3 deletions application/config/applications/mapbender_user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,28 @@ parameters:
published: true
persistentView: false
template: Mapbender\CoreBundle\Template\Fullscreen
custom_css: ~
custom_css: null
regionProperties:
- name: toolbar
properties:
item_alignment": right # left/right/center
screenType: all # desktop/mobile/all
generate_button_menu: false # true/false
menu_label: NULL # NULL or text
- name: sidepane
properties:
name: accordion
name: accordion # tabs (for button) / accordion / NULL
align: left # right/left
closed: false # true/false
screenType: all # all/desktop/mobile
width: "300px"
resizable: true
- name: footer
properties:
item_alignment": right # right/left/center
screenType: all # all/desktop/mobile
generate_button_menu: false # true/false
menu_label: NULL # NULL or text
layersets:
themes:
selected: true
Expand Down Expand Up @@ -85,7 +102,7 @@ parameters:
layers:
12: { name: osm, title : OSM Demo WhereGroup, visible: true }
info_format: text/html
visible: true
visible: false
format: image/png
transparent: true
tiled: true
Expand Down
35 changes: 22 additions & 13 deletions application/config/applications/mapbender_user_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,28 @@ parameters:
published: true
persistentView: false
template: Mapbender\CoreBundle\Template\Fullscreen
custom_css: |
.toolBar.top {
border-bottom: 1px solid #009ee0;
}
.popup {
border: solid 1px #b9BABC;
border-radius: 10px;
}
.popupHead {
border-bottom: solid 1px #b9BABC;
margin: 0 20px 20px 20px;
padding: 20px 0 10px 0;
}
custom_css: null
regionProperties:
- name: toolbar
properties:
item_alignment": right # left/right/center
screenType: all # desktop/mobile/all
generate_button_menu: false # true/false
menu_label: NULL # NULL or text
- name: sidepane
properties:
name: accordion # tabs (for button) / accordion / NULL
align: left # right/left
closed: false # true/false
screenType: all # all/desktop/mobile
width: "300px"
resizable: true
- name: footer
properties:
item_alignment": right # right/left/center
screenType: all # all/desktop/mobile
generate_button_menu: false # true/false
menu_label: NULL # NULL or text
layersets:
themes:
selected: true
Expand Down

0 comments on commit 87164a7

Please sign in to comment.