[Chameleon] [UNCLASSIFIED] QuickZoom and SQLQuery widget integration

Julien-Samuel Lacroix jlacroix at dmsolutions.ca
Mon Dec 5 10:42:47 EST 2005


If you want to build your own widget, here's some hints to help you. 
There's a lot of way to acheive that. This one is to build a widget that 
derive from the SQLQuery widget to take advantage of the functionalities 
already available in this one.

- Build a widget that derive from QuickZoom. Include the QuickZoom file, 
but also the SQLQuery one.

- Add a member variable called moSQLQuery.

- In the Constructor, add a variable that will contains a SQLQuery 
widget ($this->moSQLQuery = new SQLQuery();). Don't forget (like in all 
other function) to call the parent function too!

- In InitDefault, set the all the SQLQuery member vairables and after 
call the SQLQuery InitDefault:
$this->moSQLQuery->mszUserName ='user';

- In the ParseURL, begin by calling the SQLQuery ParseURL. From now, you 
will have access to the results of your SQL query via a SharedResource 
(See SQLQuery widget code for more details). So now you need to hack the 
widget contents to make the original QuickZoom work.

$this->moSQLQuery->mszSharedResourceName ] as $aMySQLResult)
     // Check how the QuickZoom
     // $this->maszContents["VIEW"] is built and
     // build the same thing from the $aMySQLResult array.
     $this->maszContents["VIEW"] = array(...);

Then call the parent ParseURL.


Dale.Young at brs.gov.au wrote:
> Hi all,
> I have extent information for 100+ regions stored in a MySQL 
> database and would like to implement it in something along the lines of 
> the QuickZoom widget without of having to hard-code.
> I am a new user of Chameleon, and after reading the doco for Widget 
> creation and the JSAPI am a little unsure as to the development path to 
> take.  
> Wondering if anyone might be able to advise?
> Regards
> Dale
> ----------------------------------------------------------------------
> IMPORTANT - This message has been issued by The Department of 
> Agriculture, Fisheries and Forestry (DAFF). The information transmitted 
> is for the use of the intended recipient only and may contain 
> confidential and/or legally privileged material. It is your 
> responsibility to check any attachments for viruses and defects before 
> opening or sending them on.
> Any reproduction, publication, communication, re-transmission, 
> disclosure, dissemination or other use of the information contained in 
> this e-mail by persons or entities other than the intended recipient is 
> prohibited. The taking of any action in reliance upon this information 
> by persons or entities other than the intended recipient is prohibited. 
> If you have received this e-mail in error please notify the sender and 
> delete all copies of this transmission together with any attachments. If 
> you have received this e-mail as part of a valid mailing list and no 
> longer want to receive a message such as this one advise the sender by 
> return e-mail accordingly. Only e-mail correspondence which includes 
> this footer, has been authorised by DAFF
> ----------------------------------------------------------------------
> ------------------------------------------------------------------------
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/

More information about the Chameleon mailing list