[Chameleon] Creating my own Widget

Robin Robin querada499 at hotmail.com
Fri Sep 10 13:07:35 EDT 2004

Thank you.  I fogot to mention that I did in fact change that line of code.  
I also changed this one:
$this->moPopup->mszLink = 
to point to my HotlinkResults.phtml.

Thanks for the advice though.


>From: Ken-ichi <kueda at wso.williams.edu>
>To: chameleon at lists.maptools.org
>Subject: Re: [Chameleon] Creating my own Widget
>Date: Fri, 10 Sep 2004 09:53:57 -0700
>I'm a total newbie at writing widgets too, but it looks to me like that 
>first if clause in the QueryWMouseClick() JavaScript function is failing.  
>I suspect you didn't change the $this->SetNavCommand("QUERY") line in the 
>Query widget constructor, and that for some reason, since your new widget 
>isn't called Query, Chameleon isn't setting the NAV_CMD to QUERY when you 
>click on the button.  Maybe I'm wrong.  You can monitor the form values 
>(including dynamically generated ones) with the Web Developer extension for 
>Hope I'm not leading you in the wrong direction.
>Robin Robin wrote:
>>Hello all,
>>I am trying to create my own widget and I am running into some problems.  
>>I am trying to create a hotlink widget which will work similar to identify 
>>but will open a webpage when the location on the map is clicked.  I plan 
>>to do this by copying and modifying the query widget.
>>I started by simply copying the query widget and renaming it.  I wanted to 
>>check that it still worked once the name has been changed.  It doesn't!  
>>So far, I changed the folder name to Hotlink, I have changed 
>>QueryResults.phtml to HotlinkResults.phtml and Query.widget.php to 
>>Hotlink.widget.php.  I have also changed in Hotlink.widget.php the class 
>>and constructor names from Query to Hotlink (as per instructions in an old 
>>thread I found in the chameleon archives).
>>When I click on my hotlink button the map redraws and nothing happens.  If 
>>I click the same point with my identify/query button I get a popup window 
>>with the query results.  Since I haven't changed any of the actual 
>>functionality yet, both buttons should produce the same results.
>>Are there other places where I have to change/add to files so that my new 
>>widget will be recognized?  In an older message someone mentioned changing 
>>the MapDHTMLWidget.widget.php but I couldn't tell where it should be 
>>changed (I did a text search for query).
>>Any help would be appreciated.
>>The new MSN 8: advanced junk mail protection and 2 months FREE* 
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>Chameleon mailing list
>Chameleon at lists.maptools.org

Protect your PC - get McAfee.com VirusScan Online 

More information about the Chameleon mailing list