How to add temporary poligons on map and process them?
Matt Brown
mbrown at AL1CALL.COM
Fri Jan 14 07:03:26 PST 2005
Janeks,
Look at the phpmapscript documentation for ShabeObj and LineObj - creating a
polygon is pretty straighforward, you add each point to a line object, with
the beginning and ending points the same and then add the line object to a
ShapeObj. I usually store the coordinates in an array until the polygon is
complete and then store it in a shapefile.
You might want to look into the Rosa Applet for digitizing.
very basic sample PHP code:
$line = ms_newLineObj();
$line->addXY($geoX, $geoY);
$shape = ms_newShapeObj(MS_SHAPE_POLYGON);
$shape->add($line);
Matt
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Janeks Kamerovskis
Sent: Friday, January 14, 2005 2:53 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] How to add temporary poligons on map and
process them?
Hi, List!
My I idea on subject is:
1) Temp obj on map:
a) draw using client side (f.ex. DIV objects using javascript),
b) draw using phpMapScript (I like this option better, but is it
possible?)
2) Process in DB:
I am planing to do it by using phpMapScript and WKT formats to input
them
in SQL DB.
Note: Polygon points mainly will be acuired trought processing "textual"
info from
input fields. Just is some cases there could be digitizing on screen.
Any ideas of the best way for point 1)?
brgds
Janeks
More information about the MapServer-users
mailing list