[mapserver-users] Re: php mapscript objects in session?
jim white
jbw2003 at earthlink.net
Sat Nov 22 11:32:21 PST 2008
Howard Butler wrote:
>
> On Nov 21, 2008, at 5:35 PM, jim white wrote:
>> There must be a way to persist a mapscript object, but I don't know
>> enough of OO design to tell you the answer.
>
> Ah, MapScript object persistence... the restless leg syndrome of
> MapServer. Though neither convenient nor pretty, the One True Way (TM)
> to persist MapScript objects is the mapfile format. Every other
> approach will just cause hair loss, unexplained rashes, nausea, and
> memory leakage.
>
> The UpdateFromString and save methods are the way to go. Your target
> MapScript language has no problem persisting strings, and you don't
> have to worry about the mess of object lifetimes that might result
> from trying to light up a once dead mapObj.
>
> Howard
>
I searched Mapserver site for UpdateFromString and found only MS RFC 31:
Loading MapServer Objects from Strings. I was able to use the save
function and print out the file which did work. However, my 2 attempts
failed.
$map->UpdateFromString('saved_map.txt'); got Call to undefined method
ms_map_obj::UpdateFromString()
and
$map2 = msLoadMapFromString('saved_map.txt'); got Call to undefined
function msLoadMapFromString()
I am using mapserver 5.0.0
Jim
--
James (Jim) B. White
tel: (919)-380-9615
homepage: http://jimserver.net/
More information about the MapServer-users
mailing list