[Mapbender-commits] r8816 - in trunk/mapbender: http/php lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed May 7 01:43:25 PDT 2014
Author: hwbllmnn
Date: 2014-05-07 01:43:25 -0700 (Wed, 07 May 2014)
New Revision: 8816
Modified:
trunk/mapbender/http/php/kml2transformedgeojson.php
trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
Log:
enabled transformation of actual kml payload w/o re-requesting url
Modified: trunk/mapbender/http/php/kml2transformedgeojson.php
===================================================================
--- trunk/mapbender/http/php/kml2transformedgeojson.php 2014-05-07 08:42:53 UTC (rev 8815)
+++ trunk/mapbender/http/php/kml2transformedgeojson.php 2014-05-07 08:43:25 UTC (rev 8816)
@@ -26,7 +26,7 @@
try {
if($kml->parseKml($kmlString)){
- $kml->transform($_REQUEST["targetEPSG"]);
+ $kml->transform($_GET["targetEPSG"]);
$geojson = $kml->toGeoJSON();
echo $geojson;
}else{
Modified: trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
===================================================================
--- trunk/mapbender/lib/mb.ui.displayKmlFeatures.js 2014-05-07 08:42:53 UTC (rev 8815)
+++ trunk/mapbender/lib/mb.ui.displayKmlFeatures.js 2014-05-07 08:43:25 UTC (rev 8816)
@@ -253,8 +253,8 @@
var o = self._kmls[url];
if(!o) return;
$('li[title="' + url + '"] > button[name="remove"]').click();
- $.ajax({ url: self._endpointURL,
- data: {url: o.url, targetEPSG: epsg},
+ $.ajax({ url: self._endpointURL + '?targetEPSG= ' + epsg,
+ data: self.originalKmls[url],
type: 'POST',
dataType: "json",
success : function(data,textStatus,xhr){
@@ -399,7 +399,7 @@
var displayKML = $.extend({},displayFeatures, {
- _endpointURL: "../php/kmlToGeoJSON.php",
+ _endpointURL: "../php/kml2transformedgeojson.php",
_eventNamespace : "kml"
});
$.widget('ui.kml',displayKML);
More information about the Mapbender_commits
mailing list