[Mapbender-commits] r5350 - in trunk/mapbender: http/javascripts
http/plugins resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jan 19 08:30:30 EST 2010
Author: christoph
Date: 2010-01-19 08:30:29 -0500 (Tue, 19 Jan 2010)
New Revision: 5350
Added:
trunk/mapbender/http/plugins/mb_map.js
Removed:
trunk/mapbender/http/javascripts/mapnf.php
Modified:
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
Log:
Deleted: trunk/mapbender/http/javascripts/mapnf.php
===================================================================
--- trunk/mapbender/http/javascripts/mapnf.php 2010-01-19 12:22:05 UTC (rev 5349)
+++ trunk/mapbender/http/javascripts/mapnf.php 2010-01-19 13:30:29 UTC (rev 5350)
@@ -1,54 +0,0 @@
-<?php
-# $Id:$
-# http://www.mapbender.org/Mapbender_without_iframes
-# 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.
-?>
-
-var $this = $(this);
-
-eventInitMap.register(function () {
-
- $this.data("isMap", true);
-
- $this.html('<div id="'+options.id+'_maps" name="maps" style ="width: 0px; height: 0px; z-index:2;"></div>');
-
- $this.mapbender(new Mapbender.Map (
- '',
- options.id,
- options.width,
- options.height,
- null
- ));
- mb_mapObj.push(Mapbender.modules[options.id]);
- var mapObject = Mapbender.modules[options.id];
-
- mapObject.skipWmsIfSrsNotSupported =
- options.skipWmsIfSrsNotSupported === 1 ? true : false;
-
- //
- // set restricted extent
- //
- try {
- if (restrictedExtent !== '') {
- mapObject.setRestrictedExtent(restrictedExtent);
- }
- }
- catch (e) {
- new Mb_notice("Restricted extent not set via element variable.");
- }
-
-});
Added: trunk/mapbender/http/plugins/mb_map.js
===================================================================
--- trunk/mapbender/http/plugins/mb_map.js (rev 0)
+++ trunk/mapbender/http/plugins/mb_map.js 2010-01-19 13:30:29 UTC (rev 5350)
@@ -0,0 +1,80 @@
+/**
+ * Package: mapframe1
+ *
+ * Description:
+ * The main map in Mapbender
+ *
+ * Files:
+ * - http/plugins/mb_map.js
+ *
+ * SQL:
+ * > INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
+ * > e_title, e_element, e_src, e_attributes, e_left, e_top, e_width,
+ * > e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file,
+ * > e_mb_mod, e_target, e_requires, e_url) VALUES ('<appId>','mapframe1',
+ * > 1,1,'The main map in Mapbender','','div','','',220,105,625,400,2,
+ * > 'overflow:hidden;background-color:#ffffff','','div',
+ * > '../plugins/mb_map.js',
+ * > '../../lib/history.js,map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php',
+ * > '','','http://www.mapbender.org/index.php/Mapframe');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES('<appId>', 'mapframe1',
+ * > 'skipWmsIfSrsNotSupported', '0',
+ * > 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility',
+ * > 'var');
+ *
+ * Help:
+ * http://www.mapbender.org/Mapframe
+ *
+ * Maintainer:
+ * http://www.mapbender.org/User:Christoph_Baudson
+ *
+ * Parameters:
+ * skipWmsIfSrsNotSupported - if set to 1, it skips the WMS request
+ * if the current SRS is not supported by
+ * the WMS; if set to 0, the WMS is always
+ * queried.
+ * Default is 0, because of backwards
+ * compatibility
+ *
+ * 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 $this = $(this);
+
+Mapbender.events.initMaps.register(function () {
+
+ $this.data("isMap", true);
+
+ $this.html('<div id="' + options.id + '_maps" name="maps" ' +
+ 'style="width: 0px; height: 0px; z-index:2;"></div>');
+
+ $this.mapbender(new Mapbender.Map (
+ '',
+ options.id,
+ options.width,
+ options.height,
+ null
+ ));
+
+ // for backwards compatibility
+ mb_mapObj.push(Mapbender.modules[options.id]);
+
+ var mapObject = Mapbender.modules[options.id];
+ // set restricted extent
+ mapObject.skipWmsIfSrsNotSupported =
+ options.skipWmsIfSrsNotSupported === 1 ? true : false;
+
+ // set restricted extent
+ if (typeof options.restrictedExtent !== "undefined") {
+ mapObject.setRestrictedExtent(restrictedExtent);
+ }
+ else {
+ new Mapbender.Notice("Restricted extent not set via element variable.");
+ }
+});
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql 2010-01-19 12:22:05 UTC (rev 5349)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql 2010-01-19 13:30:29 UTC (rev 5350)
@@ -1091,3 +1091,6 @@
INSERT INTO cat_op_conf VALUES (2, 'get', 'http://geomatics.nlr.nl/excat/csw', 'getrecordbyid');
INSERT INTO cat_op_conf VALUES (2, 'post', 'http://geomatics.nlr.nl/excat/csw', 'getrecordbyid');
INSERT INTO gui_cat VALUES ('gui1', 2);
+
+-- mapframe1 is now a jQuery plugin
+UPDATE gui_element SET e_js_file = '../plugins/mb_map.js' WHERE e_id = 'mapframe1';
\ No newline at end of file
More information about the Mapbender_commits
mailing list