[Mapbender-commits] r10017 - trunk/mapbender/resources/db

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Dec 14 05:35:41 PST 2018


Author: armin11
Date: 2018-12-14 05:35:41 -0800 (Fri, 14 Dec 2018)
New Revision: 10017

Modified:
   trunk/mapbender/resources/db/install_geoportal_mb28.sh
Log:
More bugfixes (qr code, map extent, ...)

Modified: trunk/mapbender/resources/db/install_geoportal_mb28.sh
===================================================================
--- trunk/mapbender/resources/db/install_geoportal_mb28.sh	2018-12-14 13:16:02 UTC (rev 10016)
+++ trunk/mapbender/resources/db/install_geoportal_mb28.sh	2018-12-14 13:35:41 UTC (rev 10017)
@@ -53,11 +53,12 @@
 maxy="5647000"
 epsg="EPSG:25832"
 ############################################################
-# define name of the default gui
+# define name of the default gui - 
+# don't use spaces, cause the gui names are used for filenames!!!! - TBD not already operabel!
+#default_gui_name="Geoportal-Default-GUI"
+#extended_search_default_gui_name="Geoportal-Extended-Search-GUI"
 default_gui_name="Geoportal-RLP"
 extended_search_default_gui_name="Geoportal-RLP_erwSuche2"
-#default_gui_name="Geoportal-RLP"
-#extended_search_default_gui_name="Geoportal-RLP_erwSuche2"
 
 ############################################################
 bbox_wgs84="6.05,48.9,8.6,50.96"
@@ -822,11 +823,13 @@
     sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "UPDATE gui_wms SET gui_wms_epsg = '$epsg' WHERE fkey_gui_id = '${default_gui_name}'"
     sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "UPDATE layer_epsg SET minx = '$minx', miny = '$miny', maxx = '$maxx', maxy = '$maxy' WHERE fkey_layer_id IN (SELECT layer_id FROM layer WHERE fkey_wms_id IN (SELECT fkey_wms_id FROM gui_wms WHERE fkey_gui_id = '${default_gui_name}' AND gui_wms_position = 0) AND layer_parent='') AND epsg = '$epsg'"
 
-
-# set first wms to be seen in the overview mapframe
-sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "UPDATE gui_element_vars SET var_value = '0' WHERE fkey_gui_id='${default_gui_name}' AND fkey_e_id='overview' AND var_name = 'overview_wms'"
-
-
+    # set first wms to be seen in the overview mapframe
+    sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "UPDATE gui_element_vars SET var_value = '0' WHERE fkey_gui_id='${default_gui_name}' AND fkey_e_id='overview' AND var_name = 'overview_wms'"
+    # set resize option to auto
+    sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "UPDATE gui_element_vars SET var_value = 'auto' WHERE fkey_gui_id='${default_gui_name}' AND fkey_e_id='resizeMapsize' AND var_name = 'resize_option'"
+    # set max height and width for resize
+    sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('${default_gui_name}', 'resizeMapsize', 'max_width', '1000', 'define a max mapframe width (units pixel) f.e. 700 or false' ,'var')"
+    sudo -u postgres psql -q -p $mapbender_database_port -d $mapbender_database_name -c "INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('${default_gui_name}', 'resizeMapsize', 'max_height', '600', 'define a max mapframe width (units pixel) f.e. 700 or false' ,'var')"
     #####################
 fi
 
@@ -1048,20 +1051,20 @@
 	cp ${installation_folder}conf/localconf.php ${installation_folder}portal/typo3conf/
 
 	# alter name of extended search gui in typo3 config file
-	sed -i "s/Geoportal-RLP_erwSuche2/${extended_search_default_gui}/g" ${installation_folder}portal/fileadmin/function/config.php
+	sed -i "s/Geoportal-RLP_erwSuche2/${extended_search_default_gui_name}/g" ${installation_folder}portal/fileadmin/function/config.php
 
 	# alter connection definition for calling keywordlist - super ugly ;-)
 	# sed -i "s/localhost//g" ${installation_folder}portal/fileadmin/scripts/keywordliste.php TODO - not always use localhost!
 	sed -i "s/5433/$mapbender_database_port/g" ${installation_folder}portal/fileadmin/scripts/keywordliste.php
-	sed -i "s/postgres/$mapbender_database_user/g" ${installation_folder}portal/fileadmin/scripts/keywordliste.php
+	sed -i "s/\"postgres\"/\"$mapbender_database_user\"/g" ${installation_folder}portal/fileadmin/scripts/keywordliste.php
 	sed -i "s/postgrespassword/$mapbender_database_password/g" ${installation_folder}portal/fileadmin/scripts/keywordliste.php
 	sed -i "s/geoportal/$mapbender_database_name/g" ${installation_folder}portal/fileadmin/scripts/keywordliste.php
 
 	# exchange path of logos
         # left:
-	sed -i "s#fileadmin/design/logo_gdi-rp.png#../mapbender/img/OSGeo_logo.png#g" ${installation_folder}portal/fileadmin/design/content_noright.html
-	sed -i "s#fileadmin/design/logo_gdi-rp.png#../mapbender/img/OSGeo_logo.png#g" ${installation_folder}portal/fileadmin/design/content_noimage.html
-	sed -i "s#fileadmin/design/logo_gdi-rp.png#../mapbender/img/OSGeo_logo.png#g" ${installation_folder}portal/fileadmin/design/content.html
+	sed -i "s#fileadmin/design/logo_gdi-rp.png#../mapbender/img/osgeo.png#g" ${installation_folder}portal/fileadmin/design/content_noright.html
+	sed -i "s#fileadmin/design/logo_gdi-rp.png#../mapbender/img/osgeo.png#g" ${installation_folder}portal/fileadmin/design/content_noimage.html
+	sed -i "s#fileadmin/design/logo_gdi-rp.png#../mapbender/img/osgeo.png#g" ${installation_folder}portal/fileadmin/design/content.html
 	# right:
 	sed -i "s#fileadmin/design/logo_rlp.png#../mapbender/img/fossgis_2019_smal.png#g" ${installation_folder}portal/fileadmin/design/content_noright.html
 	sed -i "s#fileadmin/design/logo_rlp.png#../mapbender/img/fossgis_2019_smal.png#g" ${installation_folder}portal/fileadmin/design/content_noimage.html



More information about the Mapbender_commits mailing list