[ka-Map-users] kaXmlOverlay and ONMOUSEOVER()

Brent Pedersen bpederse at gmail.com
Fri Mar 3 11:47:03 EST 2006


hi, glad it worked.

you're missing a closing } for your onmouseover.

On 3/3/06, Sepehr Sadeghi <sadegs at alum.rpi.edu> wrote:
>
> Brent,
> thanks for the help... the this.div.onmouseover = function(){ alert(pd) }
> ; worked as planned. Unfortuneately, I can not get the callout box to
> work...I am using overLib.js, have already defined it in a tag in
> index.html ;
> <script type="text/javascript" src="overlib/overlib.js"></script>
>
> here is the code for the kaXmlPoint, at the bottom is the onmouseover
> event attachment;
>
> function kaXmlPoint(pid, xml_overlay) {
>  this.xml_overlay = xml_overlay;
>  this.pid = pid;
>  this.divId = this.xml_overlay.getDivId(pid);
>  this.geox = 0;
>  this.geoy = 0;
>  this.shown = false;
>
>  this.graphics = new Array();
>
>  this.div = document.createElement('div');
>  this.div.setAttribute('id', this.divId);
>  //this.div.onmouseover =  function(){ alert(pd) };
>  this.div.onmouseover=function(){ overlib('This is an ordinary popup.');
>  this.div.onmouseout=function(){ nd() };
> }
>
> Thanks
> -Sepehr
>
> On 3/3/06, Brent Pedersen <bpederse at gmail.com> wrote:
> >
> > hi, not sure about the workings of kaXML, but you probably need
> > this.onmouseover = function(){ alert(pid) }
> > or  maybe
> > this.div.onmouseover = ...
> > -brent
> >
> >  On 3/3/06, Sepehr Sadeghi < sadegs at alum.rpi.edu> wrote:
> >
> > >  Hello All,
> > I am trying to implement a way that when you mouseover a kaXmlPoint, it
> > will display a "tooltip" or "callout".
> > Typically you could could add a ONMOUSEOVER() in the html image tag, but
> > since this is a javascript object its not straightforward.
> >
> > I tried adding a
> > * this.onmouseover(alert(pid));*
> > inside the *function kaXmlPoint(pid, xml_overlay) {*      in the
> > kaXmlOverlay.js file. That didn't work as expected!
> >
> > Does anyone have any suggestions?
> >
> > The other ways I was thinking of handling it was;
> >  - on MOUSEMOVE() , compare mouse coords to each point's coords (not
> > efficient)
> >  - create a new event handler (KA_POINT_OVER); (not sure how that would
> > work)
> >
> >
> > Thanks
> > -Sepehr
> >
> > --
> >
> >
> >
> > ..:: Sepehr Sadeghi          ::..
> > ..:: sadegs at alum.rpi.edu  ::..
> >
> >
> > _______________________________________________
> > ka-Map-users mailing list
> > ka-Map-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/ka-map-users
> >
> >
> >
> >
> >
>
>
>
> --
>
>
>
> ..:: Sepehr Sadeghi          ::..
> ..:: sadegs at alum.rpi.edu  ::..
> ..:: 603-205-4402              ::..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060303/f8021581/attachment.html


More information about the ka-Map-users mailing list