[Chameleon] Maptips
listserver server
chameleon.listserver at gmail.com
Mon May 29 03:09:41 EDT 2006
I'm tryng to use Maptips widget
i've added this..
<script type="text/javascript">
function myMaptipsOver(e, content)
{
e = (e)?e:((event)?event:null);
var d = document.getElementById('myMaptipsLayer');
if (d == null)
{
d = document.createElement( 'div' );
d.id = 'myMaptipsLayer';
document.body.appendChild(d);
d.setAttribute( 'style', 'position:absolute; top:-1000px;
left:-1000px; width:100px; height: 16px; background-color:#ffffcf;
font-family:arial; font-size:12px; z-index:100; border: 1px solid #00000;'
);
d.style.position = 'absolute';
d.style.top = "-1000px";
d.style.left = "-1000px";
d.style.width = "100px";
d.style.height = "16px";
d.style.backgroundColor = "#ffffcf";
d.style.border = "1px solid #000000";
d.style.fontFamily = "arial";
d.style.fontSize = "12px";
d.style.zIndex = 100;
}
d.style.top = (e.clientY + 10) + "px";
d.style.left = (e.clientX + 10) + "px";
d.style.height = (16 * content.length)+"px";
d.style.visibility = "visible";
var sep = "";
var result = "";
for (var i=0;i<content.length; i++)
{
result = result + sep + content[i];
sep = "<br>";
}
d.innerHTML = result;
}
function myMaptipsOut(e, content)
{
e = (e)?window.event:e;
var d = document.getElementById('myMaptipsLayer');
if (d)
{
d.style.visibility = "hidden";
}
}
</script>
<td><cwc2 type="MapTips" defaulttext=" " tolerance="2"
Attributes="nome" maptipsdiv="MapTipsLayer" label="Map Tips"
styleresource="TextButtons" popupstyleresource="TextButtons"
popupwidth="550" popupheight="475" image="images/icon_maptips.png"
toolbar="false" status="false" menubar="false" onmouseover="myMaptipsOver"
onmouseout="myMaptipsOut">
<image state="normal"/>
<image state="selected"/>
<image state="hover"/>
</cwc2>
And this on my template...
<!-- display maptips here -->
<div id="MapTipsLayer" name="MapTipsLayer"></div>
When i click on the icon of maptips i can choice my layer name but i cannot
see Attributes of layers!
I'm using postgis and not shapes! Can be this the problem??
Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060529/d029bd41/attachment.html
More information about the Chameleon
mailing list