drawing a point in MapScript
Patricio Cifuentes Ithal
pcifuentes at SIIGSA.CL
Fri May 5 11:10:43 PDT 2006
Hi all....
View my build proyects, in CHILE... with MapServer and Postgis... and more functions... is very goods.
LINK....
http://datum.siigsa.cl
the very important is ... the data catografics, is in repository "geo-datawarehouse".... postgres 7.4.8.... size 4,6 GB now. AND model relational oriented a objects data,
after suscribe in the site and upload your shape, and contents.
bye.
--
Patricio Cifuentes Ithal
Ingeniero en Informática
Informática
SIIGSA
(56-2) 204 60 22
----- Original Message -----
From: d c
To: MAPSERVER-USERS at lists.umn.edu
Sent: Friday, May 05, 2006 1:57 PM
Subject: [UMN_MAPSERVER-USERS] drawing a point in MapScript
Hi,
I'm having a problem with rendering a point with PHP Mapscript.
I'm wondering what I'm doing wrong. I'm trying to simulate the
following Mapfile code (which works well in Mapfile mode):
LAYER
TYPE POINT
STATUS DEFAULT
FEATURE
POINTS
-64.4333333 -64.7833333
END
TEXT "HELLO WORLD"
END
CLASS
COLOR 255 0 0
SYMBOL 'cross'
LABEL
TYPE bitmap
END
END
TOLERANCE 5
PROJECTION
"proj=latlong"
"datum=WGS84"
END
END
/********* PHP CODE ***********/
$map = ms_newMapObj("Ant.map");
$layer = ms_newLayerObj($map);
$layer->name = 'point';
$layer->type = MS_LAYER_POINT;
$layer->status = MS_DEFAULT;
$layer->setProjection("proj=latlong,datum=WGS84");
$pt = ms_newPointObj();
$pt->setXY(-64.4333333,-64.7833333);
$ln = ms_newLineObj();
$ln->add($pt);
$shp = ms_newShapeObj(MS_SHAPE_POINT);
$shp->text = 'HELLO WORLD';
$shp->add($ln);
$layer->addFeature($shp);
$class1 = ms_newClassObj($layer);
$class1->name = 'pointclass';
$class1->label->type = MS_BITMAP;
$class1->label->color->setRGB(255,0,0);
$class1->label->set('position',MS_AUTO);
$class1->status = MS_ON;
$class1->settext = 'HELLO WORLD';
$style = ms_newStyleObj($class1);
$style->symbolname = 'cross';
$style->color->setRGB(255,0,0);
$style->size = 10;
$style->outlinecolor->setRGB(255,255,255);
$image=$map->draw();
$image->saveImage('C:/ms4w/Apache/htdocs/tmp/'.$image_name);
I'm followig (except for the projection bit) the code proposed in
Beginning Mapserver and a tutorial I found on the Net. The code
seems identical.
What am I doing wrong?
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060505/f90ce206/attachment.htm>
More information about the MapServer-users
mailing list