[Mapbender-commits] r8990 - in trunk/mapbender: http/plugins lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jul 4 06:26:23 PDT 2014


Author: hwbllmnn
Date: 2014-07-04 06:26:23 -0700 (Fri, 04 Jul 2014)
New Revision: 8990

Modified:
   trunk/mapbender/http/plugins/mb_digitize_widget.php
   trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
Log:
fixed storing of predefined icon names


Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-07-04 12:52:52 UTC (rev 8989)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-07-04 13:26:23 UTC (rev 8990)
@@ -412,6 +412,9 @@
                 if(k === 'fill-opacity') {
                     editStyleDialog.find('.opacity-slider[data-name="fill-opacity"]').slider('value', v * 100);
                 }
+                if(k === 'marker-symbol' && feature.properties['marker-type'] === 'predefined') {
+                    editStyleDialog.find('input[name="marker-symbol"]').val('icon-' + v + '-24');
+                }
             });
 
             editStyleDialog.find('form input').bind('change', function() {
@@ -434,6 +437,12 @@
                 }
 
                 feature.properties[$(this).attr('name')] = $(this).val();
+
+                if($(this).attr('name') === 'marker-symbol' && editStyleDialog.find('input[name="marker-type"]').val() == 'predefined') {
+                    var m = $(this).val().match(/^icon-(.+)-24$/)[1];
+                    feature.properties['marker-symbol'] = m;
+                }
+
                 kml.render();
                 var preview = editStyleDialog.find('.digitize-preview').html('').get(0);
                 kml.renderPreview(feature, preview);

Modified: trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
===================================================================
--- trunk/mapbender/lib/mb.ui.displayKmlFeatures.js	2014-07-04 12:52:52 UTC (rev 8989)
+++ trunk/mapbender/lib/mb.ui.displayKmlFeatures.js	2014-07-04 13:26:23 UTC (rev 8990)
@@ -602,7 +602,7 @@
             }
 
             $.each(this.icons.icons, function(_, v) {
-                if('icon-' + v.properties.name === feature.properties['marker-symbol']) {
+                if(v.properties.name === (feature.properties['marker-symbol'] + '-24')) {
                     $.each(v.icon.paths, function(_, p) {
                         var raph = Raphael();
                         var tmp = raph.path(p);



More information about the Mapbender_commits mailing list