[Mapbender-commits] r9252 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jul 14 02:16:31 PDT 2015
Author: armin11
Date: 2015-07-14 02:16:31 -0700 (Tue, 14 Jul 2015)
New Revision: 9252
Modified:
trunk/mapbender/http/plugins/kmlTree.php
trunk/mapbender/http/plugins/mb_digitize_widget.php
trunk/mapbender/http/plugins/mb_loadkmlgeorss.js
Log:
Bugfixes for new digitize module
Modified: trunk/mapbender/http/plugins/kmlTree.php
===================================================================
--- trunk/mapbender/http/plugins/kmlTree.php 2015-07-14 06:24:49 UTC (rev 9251)
+++ trunk/mapbender/http/plugins/kmlTree.php 2015-07-14 09:16:31 UTC (rev 9252)
@@ -580,23 +580,25 @@
});
$(dlg).dialog('destroy');
});
+ //upload of remote files
var ifr = $('iframe[name="kml-upload-target"]')[0];
var onloadfun = function() {
ifr.onload = null;
- var txt = $(this).contents().find('pre').text(); // result von uploadKML.php
+ var txt = $(this).contents().find('pre').text(); // result von php/uploadKML.php
+ //alert(txt.length);
var data;
+ //returns geojson from kml (from internal parser) or geojson native - no parsing or exception - then gpx!
try {
data = JSON.parse(txt);
-
} catch (e) {
-
var xml = new DOMParser().parseFromString(txt, 'application/xml');
data = toGeoJSON.gpx(xml);
}
+ //alert(JSON.stringify(data).length);
var kml = $('#mapframe1').data('kml');
var name;
- // check the features for properties
- data = setFeatureAttr(data);
+ // check the features for properties - old handling!!!!!
+ //data = setFeatureAttr(data);
if (data.hasOwnProperty('title')) {
Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php 2015-07-14 06:24:49 UTC (rev 9251)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php 2015-07-14 09:16:31 UTC (rev 9252)
@@ -720,10 +720,15 @@
schemaInstance = instantiate( options.polygonAttributesSchema );
geomType = "Polygon"
break;
- case "Polyline":
+ case "LineString":
schemaInstance = instantiate( options.polylineAttributesSchema );
geomType = "Polyline"
break;
+ //TODO: difference between polyline and linestring????
+ case "Polyline":
+ schemaInstance = instantiate( options.polylineAttributesSchema );
+ geomType = "Polyline"
+ break;
}
attributesDialog.dialog('open');
attributesDialog.find('*').unbind();
Modified: trunk/mapbender/http/plugins/mb_loadkmlgeorss.js
===================================================================
--- trunk/mapbender/http/plugins/mb_loadkmlgeorss.js 2015-07-14 06:24:49 UTC (rev 9251)
+++ trunk/mapbender/http/plugins/mb_loadkmlgeorss.js 2015-07-14 09:16:31 UTC (rev 9252)
@@ -56,7 +56,7 @@
"sProcessing": "Processing...",
"sLengthMenu": "Show _MENU_ entries",
"sZeroRecords": "No matching records found",
- "sInfo": "SLowing _START_ to _END_ of _TOTAL_ entries",
+ "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "Showing 0 to 0 of 0 entries",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
More information about the Mapbender_commits
mailing list