[OpenLayers-Dev] OLON / context

Tim Schaub tschaub at openplans.org
Tue Feb 5 15:01:51 EST 2008


Pierre GIRAUD wrote:
> Hi Tim Schaub and Lorenzo Becchi, and others,
> I'm really interested in the work you did in the context sandbox and
> specifically on the OLON format.
> Can you give clues on what its current state is ?
> Was it abandoned and replaced by the brand new WMC format ? I thought
> that this would be used for an history control but it doesn't seem to
> be.

The context stuff is pretty solid.  I stopped working on it shortly 
after the foss4g sprint, but I think it has good potential.

The idea is that any instance of an OL class is serializable if the 
arguments to it's constructor are serializable.  Arguments are 
serializable if they are 1) objects that can be represented as json (no 
circular references) or 2) instances of an OL class that meet the 
condition in the first sentence.

The serialize/deserialize code is in place.  You can call the static 
OpenLayers.Class.serialize and OpenLayers.Class.deserialize methods on 
any object.  If a prototype has a serializable property (see the 
HTTPRequest layer or others), then instances of a parent class or 
subclass will be serialized as OLON (OpenLayers Object Notation).

The work left to be done is to 1) go around the library adding 
serializable properties to prototypes (there is a bit of magic with 
inheritance of this property that deserves documentation), and 2) give 
the write method of OpenLayers.Format.OLON a filter option so you can 
specify what you want serialized.

Though I originally suggested that Lorenzo use OLON as an intermediate 
structure for the WMC and OWS Context work, I ended up not using it for 
the WMC work I did.  (This was because I wanted to get the WMC format in 
the trunk before having to completely finish the OLON work.  Apologies 
to Lorenzo.)  The reason it did make sense to use OLON as an 
intermediate structure is that it would be a structure that we could 
agree on (the idea being that wmc.read(doc) should return a regular 
structure that you can rely on).

> Would it be a good start point to build an application level context ?

Yeah, I think so.

I'm happy to discuss more on IRC.


> Regards,
> Pierre
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> !DSPAM:4033,47a8842e169801015089218!

More information about the Dev mailing list