[ka-Map-users] Markers question

Denis Frolov den at demax.ru
Tue May 23 09:50:55 EDT 2006


Paul,

I'm trying to implement a Google Maps style markers and am using kaXMLOvrlay
with points that have onmouseclick function attached. This function is
essentially a code snippet below posted by you and it shows a speech bubble
near the marker. Markers are shown on map as points of kaXMLOverlay.

The problem I'm facing is:

- If z-index of canvas with speech bubbles is equal or higher than z-index
of xml overlay with markers then click event doesn't make it to the div with
marker. The method that shows speech bubble is run only once after the first
click (before the canvas is actually created) - further clicks on markers
are ignored.

- if z-index of canvas is lower that z-index of xml overlay all clicks are
handled ok but marker images are shown above the canvas with "speech bubble"
which is of course not a desirable behavior.

Is there a solution to this problem?

on 5/15/06 2:31 PM, Paul Spencer at pspencer at dmsolutions.ca wrote:

> James,
> 
> the capability to add marker images exists ... you can do the following:
> 
> var canvas = null;
> 
> function addMarker(x,y) {
>    if (!canvas) {
>      canvas = myKaMap.createDrawingCanvas(500);
>    }
>    var img = document.createElement('img');
>    img.src = 'images/marker.png';
>    myKaMap.addObjectGeo(canvas,x,y,img);
>    return img;
> }
> 
> a canvas can be used to hold more than one marker.  You can have more
> than one canvas.  Since it is actually just a <div> you can also do
> stuff like change its visibility, opacity etc using css.
> 
> 'img' can be any html element, for instance it could be a div that
> contains several images (drop shadow?) or a combination of images and
> text (popup dialog?)
> 
> x,y is the location in your coordinate system.
> 
> Cheers
> 
> Paul
> 
> On 15-May-06, at 1:28 AM, <James.Ring at ga.gov.au>
> <James.Ring at ga.gov.au> wrote:
> 
>> Hi all,
>> 
>> First of all, I'm new to ka-map, but I'm investigating it as a
>> potential tool
>> for use here at Geoscience Australia (a national repository for all
>> sorts of
>> geospatial data). I'm very impressed with ka-map's functionality!
>> 
>> Are there any plans to add Google Maps-style markers to the API?
>> I've seen
>> some discussion about it here, are there any patches floating
>> around which
>> implement that behaviour?
>> 
>> Awesome tool, I look forward to using ka-maps more and (hopefully)
>> contributing something useful back to it.
>> 
>> Thanks,
>> James
>> 
>> _______________________________________________
>> ka-Map-users mailing list
>> ka-Map-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                           pspencer at dmsolutions.ca   |
> +-----------------------------------------------------------------+
> |Applications & Software Development                              |
> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
> 
> 
> 
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> 


---
Denis Frolov
Media Agency Design Maximum

Tel: +7 863 2648211
Fax: +7 863 2645229
Web: http://www.designmaximum.com





More information about the ka-Map-users mailing list