[Chameleon] N- LegendTemplates and cwcjsapi events
Brent Lund
Brent.Lund at state.mn.us
Thu Dec 28 17:28:54 EST 2006
I have an application using 2 LegendTemplates.
<cwc2 type="LegendTemplate" styleresource="TextButtons" embedded="true"
template="legend.html" PopupWidth="500" PopupHeight="500"
Toolbar="false" Status="false" Menubar="false" Visible="true"
Image="icons/icon_legend.png" ImageTip="Display Legend" LABEL="Legend"
controlvisibility="false"/>
<cwc2 type="LegendTemplate" styleresource="TextButtons" embedded="true"
template="rel_link_template.html" PopupWidth="500" PopupHeight="500"
Visible="true" ImageTip="Related Links" LABEL="RelatedLinks"
controlvisibility="false"/>
When I change layers, the first LegendTemplate is updated but the second
is not updated.
Is it possible to trigger events to update more than one LegendTemplate?
Looking at the script generated I'm not sure
function LegendTemplateWRegisterForEvent()
{
goCWCJSAPI.RegisterEvent(LAYER_STATUS_CHANGED,
"LegendTemplateWLayersChanged");
goCWCJSAPI.RegisterEvent(LAYER_ORDER_CHANGED,
"LegendTemplateWLayersChanged");
goCWCJSAPI.RegisterEvent(MAP_NEW_LAYER_ADDED,
"LegendTemplateWLayersChanged");
}
/**
* LegendTemplateWLayersChanged
* called when the layers are changed(JSAPI)
*/
function LegendTemplateWLayersChanged()
{
goCWCJSAPI.ProcessLegendTemplate(34);
}
(where does 34 come from?)
thanks
Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20061228/99bb45d2/attachment.html
More information about the Chameleon
mailing list