[ka-Map-users] Dynamic points on the map, can you help please?

The Bun rosario.carbone at ipl.com
Fri Oct 12 11:08:05 EDT 2007


I am trying to add points in my prototype dinamically, this is more or less
the code I have tested, with something like 100 variations but always with
the same result, the Point doesn't come out on the image ($image), the
projection of the map and other layers is "latlong" and the extend is:
EXTENT -180 -90 180 90. What I am doing wrong? I spent two days but I cannot
prove I can add a point dinamically, Please can you help? I know .... I send
this post on the MapServer forum but the fact is I am using ka-map demo and
I changed the code in tile.php so I thought to post in this forum as well,
please can you help?

        // create a temp layer to hold our points
        $point_layer = ms_newLayerObj($oMap);
        $point_layer->set("name", "markers");
        $point_layer->set("type", MS_LAYER_POINT);
        $point_layer->set("status", MS_ON);
        $point_layer->set("transparency", MS_GD_ALPHA);
        // create a class and style for this layer
        $point_class = ms_newClassObj($point_layer);
        $point_class->set("status", MS_ON);

        $symbolid = ms_newSymbolObj($oMap, "cpoint");
        $oSymbol = $oMap->getsymbolobjectbyid($symbolid);

        $point_style = ms_newStyleObj($point_class);
        $point_style->set("symbol", $oSymbol);
        $point_style->set("symbolname", "cpoint");
        $point_style->set("size", "20");
        $point_style->color->setRGB( 250,50,0);

        $point->setXY(40, 40);

        // draw our image without the points
        $image = $oMap->draw();

        $return = $point->draw($oMap, $point_layer, $image, 0, "");


Rosario (The Bun)
View this message in context: http://www.nabble.com/Dynamic-points-on-the-map%2C-can-you-help-please--tf4614164.html#a13176981
Sent from the ka-map-users mailing list archive at Nabble.com.

More information about the ka-Map-users mailing list