[OpenLayers-Users] map.toJSONString, too much recursion
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Wed Jan 10 12:25:23 EST 2007
Hi Tim,
I would be very interested in this. Are you able to e-mail me the code,
or provide it in some other way?
Currently, I use PHP/Mapscript on the server-side to read in a WMC,
create a MAP file, and then convert the MAP file to OpenLayers
javascript objects. That works pretty fine. But I haven't got a way yet
to go from OpenLayers objects to WMC for interaction with a print
service. My interest is mainly WMS layers though.
Thanks in advance.
Best regards,
Bart
Tim Schaub schreef:
>> okay, are there plans for adding a toJSONString function to
>> the Map object in OpenLayers? Or does anyone have one lying
>>
>
> The WMC spec has some promise here. I've got a half baked control lying
> around on the shelf that creates a WMC doc given the state of the map. The
> doc is maintained as a JSON data structure that can be translated to XML.
> The same control would parse WMC docs (converting the XML to JSON) and set
> the map state.
>
> If anyone is significantly motivated, this could be finished. (Decisions
> would have to be made on how to extend WMC to handle OL specific stuff - but
> it is set up for that.)
>
> Tim
>
>
>
>> Best regards,
>> Bart
>>
>> Christopher Schmidt schreef:
>>
>>> On Wed, Jan 10, 2007 at 01:00:38PM +0100, Bart van den
>>>
>> Eijnden (OSGIS) wrote:
>>
>>>
>>>
>>>> Hi list,
>>>>
>>>> I am trying to get the OpenLayers map object as a JSON
>>>>
>> string (using
>>
>>>> http://www.json.org/json.js), but I get too much recursion
>>>>
>> errors in
>>
>>>> both IE and Firefox.
>>>>
>>>>
>>> The OpenLayers Map object has recursive references. Using
>>>
>> toJSONString
>>
>>> from JSON.org will probably not work.
>>>
>>> Regards,
>>>
>>>
>> --
>> Bart van den Eijnden
>> OSGIS, Open Source GIS
>> bartvde at osgis.nl
>> http://www.osgis.nl
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl
More information about the Users
mailing list