[Mapbender-users] mb 2.7.3 vendorspecific

karsten karsten at terragis.net
Fri Jan 11 16:52:37 PST 2013


I forgot to mention I also have this php code on top above the JS code ..
 
<?php
# $Id:
# add vendor-specific parameters to MapRequest and FeatureInfoRequests
# http://www.mapbender.org/index.php/mod_add_vendorspecific.php
#
# 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
 
require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
?>

  _____  

From: karsten [mailto:karsten at terragis.net] 
Sent: Friday, January 11, 2013 04:50 PM
To: 'mapbender_users at lists.osgeo.org'
Subject: mb 2.7.3 vendorspecific


Hi all,
 
I am working on porting the last pieces of a MB 2.4.3 applciation to MB v
2.7.3. The alst thing I need to fix is a custom vendorspecific parameter
that is added to a query layer ( a wms MapServer layer with query string) .
The exisitng code from my 2.4.3 installation is not working any more. The
code below gives me the error
"Can't read property wms from undefined "
in line
mb_registerVendorSpecific("mod_vs_init(mb_mapObj[i].wms[ii].wms_title,
functionName)");
 
In mod_add_vendorspecific.php I have the following:
----------------------------------------------------------------------------
------------------------------------
mb_registerVendorSpecific("mod_vs_init(mb_mapObj[i].wms[ii].wms_title,
functionName)");
 
var cruiseFilter = 'select * from counties where 1=2';
var addAffectedWMSTitle = "Query";
 
function mod_vs_init(wmsTitle, functionName) {
 if (functionName == 'setMapRequest' || functionName ==
'setSingleMapRequest') { 
  if (wmsTitle == addAffectedWMSTitle){
   var cruiseFilterString = escape(cruiseFilter);
   return 'cruiseFilterCondition=' + cruiseFilterString;
     }
 }
}
 
function  buildMapfileFilter(themapSQL){
 cruiseFilter = themapSQL;
 zoom("mapframe1", true,0.9999);
}
 
----------------------------------------------------------------------------
-------
 
Any hint is greatly appreciated

Karsten





=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 9.0.0.2308, Virus/Spyware Database: 6.20940)
http://www.pctools.com/
=======
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20130111/9a45b941/attachment.html>


More information about the Mapbender_users mailing list