[Mapbender-commits] r9845 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 15 00:33:04 PST 2018


Author: armin11
Date: 2018-01-15 00:33:04 -0800 (Mon, 15 Jan 2018)
New Revision: 9845

Modified:
   trunk/mapbender/http/classes/class_kml_ows.php
Log:
Map symbol size given in pixel to small, medium, large values from simplestyle-spec

Modified: trunk/mapbender/http/classes/class_kml_ows.php
===================================================================
--- trunk/mapbender/http/classes/class_kml_ows.php	2018-01-15 06:32:43 UTC (rev 9844)
+++ trunk/mapbender/http/classes/class_kml_ows.php	2018-01-15 08:33:04 UTC (rev 9845)
@@ -322,14 +322,28 @@
 							$makiUrl = "https://raw.githubusercontent.com/mapbox/maki/master/icons/";
 							switch($currentPropertiesSimpleStyle['marker-size']) {
 								case "medium":
-									$symbol = $makiUrl.$currentPropertiesSimpleStyle['marker-symbol']."-11.svg";
+									$symbol = $makiUrl.$currentPropertiesSimpleStyle['marker-symbol']."-15.svg";
 									break;
-								case "smal":
-									$symbol = $makiUrl.$currentPropertiesSimpleStyle['marker-symbol']."-11.svg";
+								case "small":
+									$symbol = $makiUrl.$currentPropertiesSimpleStyle['marker-symbol']."-15.svg";
 									break;
+								case "large":
+									$symbol = $makiUrl.$currentPropertiesSimpleStyle['marker-symbol']."-15.svg";
+									break;
 								default :
 									$symbol = $makiUrl.$currentPropertiesSimpleStyle['marker-symbol']."-15.svg";
 									break;
+							}
+							//test for marker-size as integer - map it to discrete values
+							$sizeInt = (integer)$currentPropertiesSimpleStyle['marker-size'];
+							if (is_int($sizeInt) && $sizeInt > 0) {
+								if ($sizeInt >= 15 && $sizeInt < 25) {
+									$currentPropertiesSimpleStyle['marker-size'] = "small";
+								} elseif ($sizeInt >= 25 && $sizeInt < 35) {
+									$currentPropertiesSimpleStyle['marker-size'] = "medium";
+								} else {
+									$currentPropertiesSimpleStyle['marker-size'] = "large";
+								}
 							}							
 							//alternative for local maki icons
 							$symbolUrl = MAPBENDER_PATH."/php/mod_getSymbolFromRepository.php?";



More information about the Mapbender_commits mailing list