Creation symbols in PHP Mapscript on the fly

Burgholzer,Robert rwburgholzer at DEQ.VIRGINIA.GOV
Mon Sep 24 10:02:39 EDT 2007


Pavel,
One approach would be to create a symbol file in PHP, then load it using:
(mapObj function description from mapserver PHP/Mapscript docs)
   int setSymbolSet(string fileName)
       Load and set a symbol file dynamictly.

Alternatively, you may be able to simply set your map file at the beginning, then write to it via PHP (maybe you would have one file that contained stock symbols, then create your symbol file by copying the stock symbol files, and appending the dynamically generated ones).

Good luck!  If you create any code snippets, I would be interested in seeing them.
r.b.


Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
rwburgholzer at deq.virginia.gov
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/
Web-Based Water Supply Planning Demo:
http://soulswimmer.dynalias.net/models/wsdemo/demo_hsi.php

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Pavel Dobeš
Sent: Wednesday, September 19, 2007 10:15 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Creation symbols in PHP Mapscript on the fly

Hi,

is possible to set up on the fly this type of symbol only in PHP or have I to save it into symbol file?


Symbol
Name '45'
Type TRUETYPE
Font "vera-bold"
Character "45"
Antialias TRUE
END

I was trying some things described on http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/symbolobj but I feel i miss something important.

I need this symbols because I'm using numbered points with numbers in the middle of those points.

Regards
Pavel



More information about the mapserver-users mailing list