Opened 19 years ago
Last modified 17 years ago
#1367 closed defect
symbolObj fixes for PHP Mapscript 4.6.0-beta2 — at Initial Version
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | 5.0 release |
Component: | MapScript-PHP | Version: | 4.6 |
Severity: | normal | Keywords: | |
Cc: | mapserver@… |
Description
I've just been looking at dynamically creating symbols on the fly using PHP Mapscript, and found a couple of bugs which I believe I have fixed with the attached patches. 1) symbolObj has no imagepath property This was fixed by copying the code from mapsymbol.c to allow the imagepath property to be set via mapscript. I was a little unsure about how the current path should be handled, so at the moment it assumes that the path to the GIF/PNG is absolute without considering the current path from the environment. 2) symbolObj->setPoints() doesn't correctly set symbolObj->sizex/sizey Using setPoints() to load an array of points for a vector symbol was not correctly setting sizex/sizey to the maximum extents of the symbol. Hence all symbols were being drawn with a size of 0 and did not appear to be visible. This was fixed by borrowing the code from mapsymbol.c to set sizex/sizey to the maximum extents of the symbol as points are added to the symbol. Many thanks, Mark.
Note:
See TracTickets
for help on using tickets.
imagepath patch