[Chameleon-dev] [Bug 1787] New: [Chameleon-Samples]Need to add the
JavaScript code to handle the layers status in JSAPI mode
bugzilla-daemon at bugzilla.maptools.org
bugzilla-daemon at bugzilla.maptools.org
Fri Sep 7 16:44:39 EDT 2007
http://bugzilla.maptools.org/show_bug.cgi?id=1787
Summary: [Chameleon-Samples]Need to add the JavaScript code to
handle the layers status in JSAPI mode
Product: Chameleon
Version: 2.4
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Samples
AssignedTo: chameleon-dev at lists.maptools.org
ReportedBy: nsavard at mapgears.com
We need to add the JavaScript function call in legend_template.html and the
function code in sample.js to handle the layer status in JSAPI mode.
legend_template.html
<td align="center" width=20><input type="checkbox" name="legendlayername[]"
value="[leg_layer_name]" onclick="ChangeLayerStatus('[leg_layer_name]')"
sample.js
function ChangeLayerStatus(szLayerName)
{
if(typeof goCWCJSAPI == "undefined")
{
return false;
}
szStatus = goCWCJSAPI.oMap.GetLayerByName(szLayerName).GetStatus();
//alert('status='+szStatus)
if(szStatus == "ON")
{
szNewStatus = "OFF";
}
else
{
szNewStatus = "ON";
}
goCWCJSAPI.oMap.GetLayerByName(szLayerName).SetStatus(szNewStatus);
szStatus = goCWCJSAPI.oMap.GetLayerByName(szLayerName).GetStatus();
//alert('status='+szStatus)
}
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Please do NOT reply to this email, use the link above instead to
login to bugzilla and submit your comment. Any email reply to this
address will be lost.
More information about the Chameleon-dev
mailing list