MapTools.org

[Chameleon] Item Query

Paul Spencer spencer@dmsolutions.ca
Tue, 27 Jan 2004 13:36:20 -0500
Rene,

to do this in Chameleon, you create a new widget from one of the 
existing ones that does something similar.  For instance, the Scale 
widget does something similar (it uses an input box to allow the user to 
type in a new scale value and then zooms to that scale.  You would make 
a copy of this widget and rename stuff appropriately.

Your main work would go in the ParseURL function which is where you will 
get the FORM variables that were submitted (Scale is a good example of 
this) and do something with them.  In your case, you would use the input 
value to lookup the bounding box of a Map sheet and then apply those 
extents to the map object using something like 
$this->moMapSession->oMap->setextent( $nMinX, $nMinY, $nMaxX, $nMaxY );

That's pretty much it.  Note that the Scale widget is just a container 
for the value, you use an UpdateMap widget to actually submit the page.

Cheers,

Paul

Rene Teniere wrote:

> Hi All,
> 
> Been sitting down here with the office MapServer programmer, looking to
> create an Item Query. This goes back to the message I left yesterday on
> having an input box for the user to input a mapsheet number and return
> the result on the map display. In MapServer, you would just set the
> variables and send them to MapServer for processing. The question is how
> is this achieved through Chameleon? In fact, how does it talk to
> mapserver? All we need to do is be able to figure out what variables to
> set, and where to send them.
> 
> Example: In the bounding box widget, you set the user-defined bounding
> coordinates to the variables and them pass them
> on:window.opener.applyBoundingBox( nMinX, nMinY, nMaxX, nMaxY ); 
> 
> Is there anything that can help me out on figuring this stuff out? What
> about the utils in htdocs_admin?
> 
> Any help would be greatly appreciated
> Rene
> 
> Rene J.R. Teniere - BSc., D.GIS
> GIS Technician
> Nova Scotia Department of Natural Resources
> Forestry Division (GIS) - Truro
> 
> Phone: (902) 893-5655
> Mobile: (902) 209-8956
> _______________________________________________
> Chameleon mailing list
> Chameleon@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



This archive was generated by Pipermail.