[Mapbender-commits] r9174 - in trunk/mapbender/http: extensions php plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 17 07:13:46 PDT 2015


Author: syed
Date: 2015-03-17 07:13:46 -0700 (Tue, 17 Mar 2015)
New Revision: 9174

Added:
   trunk/mapbender/http/php/mb_delete_local_data.php
Modified:
   trunk/mapbender/http/extensions/tokml.js
   trunk/mapbender/http/plugins/kmlTree.js
   trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
add file to svn

Modified: trunk/mapbender/http/extensions/tokml.js
===================================================================
--- trunk/mapbender/http/extensions/tokml.js	2015-03-17 10:33:56 UTC (rev 9173)
+++ trunk/mapbender/http/extensions/tokml.js	2015-03-17 14:13:46 UTC (rev 9174)
@@ -4,7 +4,6 @@
     encode = strxml.encode;
 
 module.exports = function tokml(geojson, options) {
-    console.log(geojson);
     options = options || {
         documentName: undefined,
         documentDescription: undefined,

Added: trunk/mapbender/http/php/mb_delete_local_data.php
===================================================================
--- trunk/mapbender/http/php/mb_delete_local_data.php	                        (rev 0)
+++ trunk/mapbender/http/php/mb_delete_local_data.php	2015-03-17 14:13:46 UTC (rev 9174)
@@ -0,0 +1,50 @@
+<?php
+# $Id: mb_listWMCs.php 1686 2007-09-26 09:05:01Z christoph $
+# http://www.mapbender.org/index.php/mb_listWMCs.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__) . "/../classes/class_wmc.php");
+
+$user_id = Mapbender::session()->get("mb_user_id");
+
+$wmc = new wmc();
+
+$wmc_id = $_POST["id"];
+
+$form_target = $self;
+
+$sql = 'delete from mb_user_wmc where wmc_id = $1 and wmc_has_local_data = 1 and fkey_user_id = $2;';
+
+$v = array($wmc_id, $user_id);
+$t = array("i", "i");
+$res = db_prep_query($sql, $v, $t);
+header("Content-Type: application/json");
+
+// if($row = db_fetch_array($res)){
+//     $wmc->createFromXml($row['wmc']);
+//     $wmc->generalExtensionArray['KMLS'] = null;
+//     $wmc->wmc_id = $wmc_id;
+//     $wmc->has_local_data = 0;
+//     $wmc->local_data_public = 0;
+//     $wmc->local_data_size = '0';
+//     $res = $wmc->insert(true);
+//     echo(json_encode($res));
+// } else {
+//     echo('{"success":false}');
+// }
+
+?>

Modified: trunk/mapbender/http/plugins/kmlTree.js
===================================================================
--- trunk/mapbender/http/plugins/kmlTree.js	2015-03-17 10:33:56 UTC (rev 9173)
+++ trunk/mapbender/http/plugins/kmlTree.js	2015-03-17 14:13:46 UTC (rev 9174)
@@ -523,7 +523,7 @@
                     return;
                 }
                 kml.addLayer(title,{
-                    "@context": {uuid: UUID.genV4().toString(), created: new Date().toISOString() ,title: title, updated: new Date().toISOString()},
+                    uuid: UUID.genV4().toString(), created: new Date().toISOString() ,title: title, updated: new Date().toISOString(),
                     type: 'FeatureCollection',
                     features: []
                 });

Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php	2015-03-17 10:33:56 UTC (rev 9173)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php	2015-03-17 14:13:46 UTC (rev 9174)
@@ -94,7 +94,7 @@
         '<div class="digitize-image digitize-style"></div>' +
         '<div class="digitize-preview"></div><br></br>' +
         // '<div class="attrAccordion">' +
-        '<table id="arp"><tr><td>Name</td><td><input id="arp-input" type="text" name="name" value="Titel"></input></td></tr>' +
+        '<table><tr><td>Name</td><td><input type="text" name="name" value="Titel"></input></td></tr>' +
         '<tr><td>Description</td><td><input type="text" name="description" value="Beschreibung CDATA"></input></td></tr>' +
         '</table><br></br>' +
         '<div class="digitize-image digitize-add"></div>' +
@@ -355,6 +355,7 @@
                     url = togpx(data, {simplestyle: true});
                 }
                 if(fmt === 'geojson') {
+                    console.log('dsafasdf');
                     url = JSON.stringify(data);
                 }
 



More information about the Mapbender_commits mailing list