[ka-Map-users] Adding a marker (image) functionality to KaMap

Clark Endrizzi cendrizzi at gmail.com
Tue May 9 14:15:04 EDT 2006


I had this working previously with some older cvs stuff.  Basically I have a
custom tool that when you click on a the map it puts a marker there.

My implementation is very simple.

On the tool initialization:
    // marker
      this.canvas = this.kaMap.createDrawingCanvas(500); //zindex=500
      this.img = document.createElement('img');
      this.img.src = 'images/mapping/Marker.png';

Then I have a function on the tool that does this:
this.kaMap.addObjectPix(this.canvas, (pixPosition[0] - 7.5), (pixPosition[1]
-27), this.img );

I can't remember why I had the - 7.5 and -27 offsets.

Should this not work?  Has anything changed.  I should say my version I'm
using now is over a month old so may I should upgrade to a new cvs version
if there have been fixes in this area.  I have tried AddObjectGeo too to
pinpoint a specific place.  It appears that the canvas or something just
isn't showing up...

Lastly the image is there so that does't appear to be the issue.

I hope this makes sense.  Thanks much,
--
Clark Endrizzi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060509/935142d9/attachment.html


More information about the ka-Map-users mailing list