[mapguide-users] PHP script for getting data from selected item(s)

James Card James.Card at calcad.com
Thu Jul 27 18:16:38 EDT 2006


On Fri, 30 Jun 2006 13:36:02 -0700, Andy Morsell <amorsell at spatialgis.com>  
wrote:

> That's awesome.  Thanks for supplying to the group.  One thing to note,  
> however, is the MgPropertyType for whatever the KeyName field  
> corresponds to.  In your case, it is a string, so you are using  
> $featureReader->GetString($KeyName).  It won't be a string in all cases,  
> so you may want to add a function to determine that dynamically along  
> the lines of what Kori had in his code yesterday: [SNIP]

I've added a function to determine the MgPropertyType and retrieve the  
appropriate value. It has survived my limited testing so far, but has not  
been thoroughly tested yet.

Also, some of the target pages we're calling (ColdFusion applications  
built around MapGuide 6.5) are expecting values to be encapsulated in  
single-quotes, I've added an option to leave them in. Because it INCLUDEs  
the constants.php file I placed it in the mapviewerphp directory to make  
it a standard part of our toolset.

What it doesn't yet have, that I'm sure we'll need eventually, is the  
ability to call the target page as an HTTP POST request rather than a GET.  
PHP has a PECL extension for HTTP functions available that might make this  
easy; it is not installed by default (and installation is not as  
straightforward as it could be), so I'd like to limit the code to those  
PHP functions that are included in the standard install.

I don't understand HTTP well enough to have PHP send the proper sequence  
of headers for a POST, so I'm hoping someone here can add the bit of  
intelligence that's still lacking.

-- 
James Card
California CAD Solutions, Inc.
209 578-5580
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passData.php
Type: application/octet-stream
Size: 6867 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060727/86db7110/passData.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passData.gif
Type: image/gif
Size: 7007 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060727/86db7110/passData.gif


More information about the Mapguide-users mailing list