[Chameleon] Enhanced widget pack
Joel Rivard
jrivard at connect.carleton.ca
Thu Jun 17 14:18:48 EDT 2004
Thanks Paul,
It Worked like a charm. I now display the information that I want.
I'm still not sure exactly where I am suppose to insert the hyperlink.
I've played with it, but no luck. Below is the code of the section
from the layerinfo_body.phtml. If you can better indicate the
location, that would be great.
Joel
<tr>
<td> <span class="label"><strong><?php echo
trim($oTmpMLT->get("45","METADATA URL")); ?>: </strong></span></td>
<td>
<?php
if ($bLayerIsEditable)
{
echo '<input type="text" name="Metadataurl" size="60"
class="label" value="';
}
else
{
echo '<span class="label">';
}
if ($szMetadataURL != "")
{
echo $szMetadataURL;
}
else
{
echo trim($oTmpMLT->get("46", "No MetadataURL available"));
}
if ($bLayerIsEditable)
{
echo '">';
}
else
{
echo "</span>";
}
?>
</td>
</tr>
Paul Spencer wrote:
>Joel,
>
>The file LegendTemplatePopup.phtml file is probably not the one you
>want, that file displays the legend template in a popup dialog. The
>file you want is the one that displays information about a layer when
>you click the layer name. This file is LegendInfo.phtml.
>Unfortunately, this starts to get a bit complicated. For historical
>reasons, this page doesn't actually display the information. It really
>comes from
>
>chameleon/htdocs/common/phpwms/layerinfo_body.phtml
>
>So you really need to modify this file instead. I just took a quick
>look in the file, it is kinda scary! There is a bunch of code at the
>top of the page to get the information about a layer, it does some
scary
>stuff relating to cached inforamation coming from DBF files which has
>nothing to do with your situation. The real changes you will need to
>make start around line 312 with the opening <table> tag. You'll need
to
>scan this section looking for the <tr>s that display the information
you
>don't want and removing those blocks. Next I would suggest that you
>could add a hyperlink to the metadata section right in here :>
>
>Cheers,
>
>Paul
>
>Joel Rivard wrote:
>
>> Hi,
>>
>> Thanks Nicolas for the tag, it displays the url. Howerver, It
displays
>> the link as text and not an acutal link that you can simply click on.
>> Is this because I am using local data instead of WMS?
>>
>> My second problem is changing the LegendTemplatePopup.phtml. When I
>> click on a layer in the legend to access more info, I want to display
>> only 4 criterias.
>>
>> Title Name:
>> Abstract:
>> Connection:
>> Metadata URL:
>>
>> I am still getting used to some of the coding and can't seem to
isolate
>> the section that identifies what criteria to add to this popup.
>>
>> Can anybody point me in the right direction,
>>
>> Joel
>>
>>
>>
>>
>> Fortin,Nicolas [SteFoy] wrote:
>>
>>
>>
>>>Hi, I think those two should work:
>>>
>>> "wms_metadataurl_href" "the url here"
>>> "wms_metadataurl_format" "the metadata format"
>>>
>>>Regards,
>>>
>>>Nicolas
>>>
>>>-----Message d'origine-----
>>>De : chameleon-bounces at lists.maptools.org
>>
>> [mailto:chameleon-bounces at lists.maptools.org] De la part de Joel Rivard
>>
>>>Envoy? : Wednesday, June 16, 2004 1:37 PM
>>>? : chameleon at lists.maptools.org
>>>Objet : Re: [Chameleon] Enhanced widget pack
>>>
>>>
>>>Paul,
>>>
>>>I checked in the WMS HOW TO? documentation and found no WMS tags that
>>>displays the Metadata URL (the one you specified wasn't correct as you
>>>mentionned). I have found others that are proving to be useful for my
>>>application, but none that allowed me to show the Metadata URL.
>>>
>>>Does anybody know this WMS tag?
>>>
>>>Joel
>>>
>>>
>>>Paul Spencer wrote:
>>>
>>>
>>>
>>>>Joel,
>>>>
>>>>The popup is provided by the LegendTemplate widget, the code for the
>>>>popup is in chameleon/htdocs/widgets/LegendTemplate/LegendTemplate.phtml
>>>>
>>>>The popup was designed to show information about WMS layers. In
>>>>particular, the abstract and metadata urls from WMS layers are normally
>>>>recorded as metadata on the layer. I don't think the widget cares if
>>>>the layer is WMS or not, but it will look specifically for:
>>>>
>>>>METADATA
>>>> "wms_abstract" "the abstract for this layer"
>>>> "wms_metadataurl" "not sure if this is right, check the WMS howto
>>>>:)" END
>>>>
>>>>So the quick fix would be to modify your map file to add this
>>>>information. If you are not happy with the layout, you could also edit
>>>>this file to get exactly what you want.
>>>>
>>>>Cheers,
>>>>
>>>>Paul
>>>>
>>>>Joel Rivard wrote:
>>>>
>>>>
>>>>>Hi list,
>>>>>
>>>>>I'm using Chameleon 1.99 beta and running the Enhanced Widget Pack as
>>>
>>>a
>>>
>>>>>sample app. I've added my own map file to show some local data and
>>>
>>>was
>>>
>>>>>wondering how to add some info upon clicking on the themes in the
>>>>>legend. When I click on any given layer, it only gives me the "layer
>>>>>name" and "layer title". I'd like to add an abstract as well as an
>>>
>>>URL
>>>
>>>>>to the Metadata. I'm not sure if this feature has to be set in the
>>>>>mapfile or if its an XML file that is controling this.
>>>>>
>>>>>Can anybody point me in the right direction,
>>>>>
>>>>>Thanks,
>>>>>
>>>>>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
>>>>
>>>
>>>_______________________________________________
>>>Chameleon mailing list
>>>Chameleon at lists.maptools.org
>>
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>> _______________________________________________
>> 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/|
> -----------------------------------------------------------------
>
>
More information about the Chameleon
mailing list