MapTools.org

[Chameleon] Item Query

Rene Teniere TENIERER@gov.ns.ca
Tue, 27 Jan 2004 14:52:52 -0400
Hi Paul,

That's very similar to what I started off with (only I used the
LocateWidget and got rid of all the inputs except NTS Map Sheet, and
added my own - Provincial Map Sheet). The problem comes in that there is
a polygon index covering the whole province containing cells
representing specific mapsheets. I have to be able to get chameleon to
find the mapsheet number within the index shapefile (the MAPSHEET item
in the index's table) using the user inputted text (essentially an item
query), then once I have the map object's extents returned, I would use
the setextent object to see it. Is this at all possible? If I
misunderstood you, I apologize, however, I don't think I exactly
explained the situation properly.

Thanks,

Rene



>>> pagameba@magma.ca 2004-01-27 2:36:20 PM >>>
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.