[Mapbender-commits] r5349 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jan 19 07:22:06 EST 2010
Author: christoph
Date: 2010-01-19 07:22:05 -0500 (Tue, 19 Jan 2010)
New Revision: 5349
Added:
trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js
Log:
result List: transfer geometries to digitize module
Added: trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js
===================================================================
--- trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js (rev 0)
+++ trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js 2010-01-19 12:22:05 UTC (rev 5349)
@@ -0,0 +1,61 @@
+/**
+ * Package: mb_resultList_transferToDigitize
+ *
+ * Description:
+ * <A description>
+ *
+ * Files:
+ * - <path and filename, like http/javascripts/mod_zoomIn1.php>
+ *
+ * SQL:
+ * > <SQL for element>
+ * >
+ * > <SQL for element var>
+ *
+ * Help:
+ * http://www.mapbender.org/<wiki site name>
+ *
+ * Maintainer:
+ * http://www.mapbender.org/User:<user>
+ *
+ * Parameters:
+ * <normal element var name> - <type and description>
+ * <optional element var name> - *[optional]* <type and description>
+ * <deprecated element var name> - *[deprecated]* <type and description>
+ *
+ * License:
+ * Copyright (c) 2009, Open Source Geospatial Foundation
+ * This program is dual licensed under the GNU General Public License
+ * and Simplified BSD license.
+ * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+ */
+
+var originalI18nObj = {
+ labelButton: "edit"
+};
+
+var translatedI18nObject = cloneObject(originalI18nObject);
+
+Mapbender.events.localize.register(function () {
+ Mapbender.modules.i18n.queue(options.id, originalI18nObj, function (translatedObj) {
+ if (typeof translatedObj !== "object") {
+ return;
+ }
+ translatedI18nObj = translatedObj;
+ });
+});
+
+Mapbender.events.init.register(function () {
+ options.$target.mapbender(function () {
+ this.addGlobalButton({
+ title: translatedI18nObject.labelButton,
+ callback: function (data) {
+ var digitizeArray = new GeometryArray();
+ digitizeArray.importGeoJSON(data.selectedRows.toString());
+ digitizeArray.get(0).wfs_conf = data.WFSConf;
+ tab_open(options.digitizeId);
+ window.frames[options.digitizeId].appendGeometryArray(digitizeArray);
+ }
+ });
+ });
+});
\ No newline at end of file
More information about the Mapbender_commits
mailing list