[OpenLayers-Dev] WMC on WMSManager
Tim Schaub
tschaub at openplans.org
Mon Jul 30 16:57:02 EDT 2007
Hey Lorenzo-
Lorenzo Becchi wrote:
> Nothing to be proud of but I've published a first step to support Web
> Map Context inside OpenLayers:
>
> http://tinyurl.com/2b6z6r
>
Looks like you've been busy.
A few ideas:
It would be good to start working towards a JavaScript structure for the
map context. For OL, this structure would contain all relevant layer
information and the current map center/resolution. On the WMC side, we
should discuss how to standardize the extensions to WMC to account for
OL specific stuff.
This structure should be serialized/deserialized with a JSON parser.
http://dev.openlayers.org/sandbox/tschaub/geojson/lib/OpenLayers/Format/JSON.js
(for example - and you can do format.write(obj, pretty) too)
In addition to translating this structure into a WMC doc, we should be
able to translate it into a short string - though this will be lossy, it
can be used to replace the permalink logic.
All this could be handled by a control like OpenLayers.Control.Context
or OpenLayers.Control.ApplicationState. This control would use the JSON
format and a (yet to be built) WMC format.
I'll be working on this sort of stuff over the next couple months. I
look forward to collaborating.
Tim
> Click on the bottom-right button "WMC Exporter" to see a pop-up with the
> JSON code of the WMC.
> Naturally you can alter the map with WMSManager and the WMC "should" be
> updated.
>
> as you can see:
> - the structure is not a perfect WMC. I've took a look from the 1.1
> specs but there are things to be cleaned up.
> - some values are empty or null. Still have to decide if it make sense
> to use all of them. We can decide together which optional elements not
> to support.
> - I've added a "visibility" attribute to Layer object because WMC is not
> providing it. Some hint how to avoid this? I'm sure you understand how
> this is important for OL to define base or overlay layers.
>
> as you can't see:
> - not all values are dinamically set. Some are still hardcoded.
>
>
> there's another problem about attributes of Layers with multiple WMS
> layers inside. Which title, abstract to use? does it make sense to
> create a comma (or something else) separated list of values?
>
>
> I'm still not sure if the MapContext should be part of the OL.Map object
> or an external Tool.
> I'll go on with the external tool and hope to create soon a WMCParser to
> import WMCs.
>
>
> My hope was to offer something better before leaving for holidays but
> many meeting/debate/ecc at work delayed coding time.
> I'll leave in 2 days and be back for the third week of August. In the
> meantime I'll be available for debate about this solution.
>
> ciao
> Lorenzo
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
> !DSPAM:4033,46adec84154021431913854!
>
More information about the Dev
mailing list