[mapserver-users] mapserver demo and some code

Robert W. Burgholzer rburghol at vt.edu
Fri Jun 29 11:28:58 PDT 2001


Hello,
With the help of a number of folks in the mapserver and postgis mailing
list, I have managed to create my first fully functioning mapserver app,
and wished to throw it out there if any body should find it useful.

Basically, it is a semi object oriented map display engine (dynamically
formatting the layers and putting together control menus) and a query
result formatting tool. It is slightly hacked up, and is derived
initially from code in the itasca demo, so if I shouldn;t be recycling
this stuff, someone can feel free to yell at me. :)

Anyhow, it is php mapscript based, and will automatically determine from
a map object what layers are there, pairs annotation layers (showing
only the parent layer, and turning the annotation layer on and off with
the parent), create a layer pallette to control visibility, etc., and
output a toolbar. There is a cryptic little file full of arrays called
adminsetup.php which has database output formatting information so that
the results of queries can be output nicely. There are a few features
for doing data joins and so forth. It will do simple querying from a map
based on shapefiles, but in order to use the more complex data types
(subselects and multiselects and maps) you must have a postgis database.

It is open source to the effect that the itasca code is. All my php
objects, which are primarily my own code are open source.

There is no README, but should be somewhat self explanatory. In order to
work, a demo must have the libraries (contents of lib directory), a map
file, the file adminsetup.php (although this file must be there and
contain the array "adminsetup", it is not necessary to have declarations
for your layers, it will simply format them "raw" if no entry is present
for the table in question) in the same directory as the file which shows
the map interface (i.e. basic.php or ther). The files basic.php will
suffice to show a general map and all of its layers and provide query
functionality. The location of the libs (module_activemap.php,
psql_functions.php) must be declared in the file basic.php or whatever
file you use to house the interface.

It only took me about 2 minutes to drop the files in place, edit the
paths and get a new shapefile based interface running using this, so it
is pretty drag and drop, however, saying that, the .map files I used
were extremely simple, so I cannot garrantee anything.

An example of this is at:

http://128.173.218.154/gis/soils_demo/

a downloadable is at:
http://128.173.218.154/gis/gis.tar.gz

If anyone acutally uses this and extends it I would love to hear from
them, share code.


Thanks again for all the help over the last several weeks,

Rob


--
Robert Burgholzer
al·go·rithm  n.
       A step-by-step problem-solving procedure, especially an established, recursive computational
       procedure for solving a problem in a finite number of steps. Invented by Al Gore.
rburghol at vt.edu
http://www.soulswimmer.net/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010629/756beb1d/attachment.htm>


More information about the MapServer-users mailing list