[Chameleon] MapTips widget

Paul Spencer pspencer at dmsolutions.ca
Thu Oct 14 21:31:22 EDT 2004


Joel,

I'll try to set up something with the Chameleon samples when I am 
testing for the beta 3 release.

Cheers,

Paul

Joel Rivard wrote:
> Hi,
> 
> Thanks for the reply Paul.
> 
> I've been testing the MapTips widget with the sample app with ms4w.
> 
>>From my understanding and playing with this widget, it doesn't seem to 
> do maptips of line features (Maybe I need to change some code 
> somewhere).  I used the widget as is (the button and the dialog box) 
> and tried rolling over the rail shapefile while using the "company" 
> field.  All that was returned was:
> 
> COMPANY:[COMPANY]
> 
> While using the popplace point feature, everything works great with the 
> widget as is.
> Now, I've enabled the layer attribute for this widget. 
> 
> Upon changing it and adding the layer and attributes, so that the 
> maptips is set to a default, the same result happened as with the lines.
> 
> NAME:[NAME}
> 
> This is what I changed in the html:
> 
> <!-- MAPTIPS -->
>       <td><cwc2 type="MapTips" defaulttext="&nbsp;" tolerance="2" 
> Layer="popplace" Attributes="Name" maptipsdiv="MapTipsLayer" label="Map 
> Tips" styleresource="TextButtons" popupstyleresource="TextButtons" 
> popupwidth="500" popupheight="450" image="images/icon_maptips.png">
>               <image state="normal"/>
>               <image state="selected"/>
>               <image state="hover"/>
>           </cwc2> 
>       </td>
> 
> When I did the same with the rail feaure (changed layer="rail" 
> Attributes="Company"), I get the following error message.
> 
> Warning: [MapServer Error]: msQueryByRect(): No matching record(s) 
> found. in 
> C:\ms4w\apps\chameleon\htdocs\widgets\MapTips\MapTips.widget.php on 
> line 378
> 
> Can anyone help me understand how to set the maptips for a line layer.
> 
> Cheers,
> 
> Joel
> 
> 
> Paul Spencer wrote:
> 
> 
> 
>>I recently added (or enabled?) a layer attribute on this widget for 
> 
> this 
> 
>>purpose.
>>
>>LAYER - the layer to display maptips for
>>
>>Other attributes are:
>>
>>ATTRIBUTES - the attributes to display in the maptips
>>DEFAULTTEXT - the text to display if not displaying a tip
>>TOLERANCE - in pixels, distance around feature to activate the hover
>>LINK - appears that this must be set to enable link url but I don't 
> 
> know 
> 
>>why :-0
>>LINKURL - a URL to open if the user clicks while over the link (leave 
>>out if you don't want this)
>>LINKUNIQUEID - an attribute name, the value of which will be appended 
> 
> to 
> 
>>the link url
>>MAPTIPSDIV - a <div id=" ... "></div> that you provide in the template 
>>to display the contents in
>>ONMOUSEOVER - optional javascript function to call on mouse over a tip, 
>>disables normal processing (i.e maptipsdiv not used)
>>ONMOUSEOUT - see onmouseover but for a mouseout event.
>>
>>Also, you can hide the button by setting visible="false".
>>
>>
>>Cheers,
>>
>>Paul
>>
>>
>>Joel Rivard wrote:
>>
>>>Hello List,
>>>
>>>I've been trying out the MapTips widget and it works great.  I am 
>>>wondering though if its possible to hard code in a file a certain 
> 
> layer 
> 
>>>that would always have MapTips, instead of having the user select the 
>>>layer.
>>>
>>>Can somebody direct me to the correct file to do this with and start 
> 
> me 
> 
>>>on where to change some of the code?
>>>
>>>Joel  
>>>_______________________________________________
>>>Chameleon mailing list
>>>Chameleon at lists.maptools.org
>>>http://lists.maptools.org/mailman/listinfo/chameleon
>>>
>>
>>-- 
>> -----------------------------------------------------------------
>>|Paul Spencer                           pspencer at dmsolutions.ca   |
>>|-----------------------------------------------------------------|
>>|Applications & Software Development                              |
>>|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
>> -----------------------------------------------------------------
>>
>>
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 



More information about the Chameleon mailing list