Need a php/mapscript example...
Camden Daily
cdaily at GMAIL.COM
Wed Jan 12 13:52:11 PST 2005
assuming you want to do this in php/mapscript...
// create our map object
$map_file = "chicago.map";
$map = ms_newMapObj($map_file);
// create a temp layer to hold our points
$point_layer = ms_newLayerObj($map);
$point_layer->set("name", "markers");
$point_layer->set("type", MS_LAYER_POINT);
$point_layer->set("status", MS_DEFAULT);
// create a class and style for this layer
$point_class = ms_newClassObj($point_layer);
$point_style = ms_newStyleObj($point_class);
$point_symbol = $map->getSymbolByName("point");
$point_style->set("symbol", $point_symbol);
$point_style->set("size", $marker_size);
// draw our image without the points
$image = $map->draw();
// initialize our point and add it to the map
$point = ms_newPointObj();
$point->setXY($longitude, $latitude);
$point->draw($map, $point_layer, $image, 0, "");
(do the above section for each point, or wrap it in a function)
// get the location for our new image
$image_url = $image->saveWebImage('MS_JPG', 1, 1, 0);
More information about the MapServer-users
mailing list