[ka-Map-users] Novice on KaMap - how to plot a point on Kamap?

The Bun rosario.carbone at ipl.com
Mon Nov 12 09:35:33 EST 2007

>  I tried copying the php code in tile.php and created an xml file named
> points.xml in the directory where
> my tile.php is present. It didn't work. One thing, where is the function
> 'add_point_to_layer' defined? I will
> try once again by cleaning the Kachace. Meanwhile, please let me know if I
> am doing something wrong.
Ops I forgot the "add_point_to_layer" function, I don't remember now but I
think it is a function I wrote:

function add_point_to_layer($layer, $longitude, $latitude) {
  // create and initialize new point object
  $point = ms_newPointObj();
  $point->setXY($longitude, $latitude);
  // create and initialize new line object
  $line = ms_newLineObj();
  // create and initialize new shape object
  // 0 is a point, MS_SHAPE_POINT doesn't work, I don't know why.
  $shape = ms_newShapeObj(0);
  // add our shape

The function may be everywhere you like while the PHP code I posted before
should be added before the cache is written, I used the code just after the

$szMetaImg = $szMetaDir."/t".$metaTop."l".$metaLeft.$szImageExtension;

in tile.php

>  Also, I liked the idea of using Javascript but again I am confused that
> which file should contain this 
> Javascript? Again, is there any .js file within Kamap directory having
> 'addObjectGeo' function?

Well, again, it is up to you actually, where you need. For my "prototype" I
used in startUp.js, I just added the code at the beginnig of the
myMapInitialized function which is the event handler for KAMAP_INITIALIZED.

Regarding addObjectGeo the function is declared in kaMap.js.

Kind Regards
Rosario Carbone

View this message in context: http://www.nabble.com/Novice-on-KaMap---how-to-plot-a-point-on-Kamap--tf4789050.html#a13706566
Sent from the ka-map-users mailing list archive at Nabble.com.

More information about the ka-Map-users mailing list