[OpenLayers-Dev] auto-generating OpenLayers javascript

Burgholzer,Robert rwburgholzer at deq.virginia.gov
Thu May 8 16:14:30 EDT 2008


Tim,
My thought is that for the initial crack at this, all I need to be able
to do is to create an easy to use plugin for WordPress, that ASSUMES
that the user can generate some OLON code.  This is not a problem for
testing purposes, and can be a place-holder for such a time as I find
some sort of standardML that can make it more universal (shoot, for now,
OLON seems to be the most universal).  This will at least allow ME to
play around with this stuff, basically, including my OL maps in blog
entries.

So, this brings me to the code. I am having trouble getting your example
to work.  When I do as you say on the page, navigate, hit "save state" I
get some OLON code, but when I refresh my browser, it returns to the
default view with "no state saved".   I don't think that I have cookie
trouble, but who knows.  (Firefox 2.0.0.14).

More importantly, since I implicitly trust that your code works, where
do I find the OLON stuff in the libraries?  And, does the method
"deserializeMap(str)" automatically assume that the map div is named
"map", or is there some directive that I am missing somewhere in your
example code.

Thanks!

Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
rwburgholzer at deq.virginia.gov
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/

-----Original Message-----
From: dev-bounces at openlayers.org [mailto:dev-bounces at openlayers.org] On
Behalf Of Tim Schaub
Sent: Wednesday, May 07, 2008 6:45 PM
Cc: dev at openlayers.org
Subject: Re: [OpenLayers-Dev] auto-generating OpenLayers javascript

Hey-

As Bart mentions, WMC is the only spec that comes close to this (but as 
he says, just for WMS layers).  The OWS Context spec is not yet adopted 
as an OGC spec (http://www.ogcnetwork.net/context).  When it is, we can 
write a parser for it.  However, this would still not treat things like 
a Google layer, or a Vector layer with a few hand drawn features, or a 
map with an overview map control.

If you really want to serialize things specific to OpenLayers, then you 
probably won't find a standard.  A while ago, we started work on an 
OpenLayers object notation (OLON).  I put together some stuff that would

allow objects created from OpenLayers classes to be serialized as OLON -

and then be deserialized again as instances of the same classes.

You can see an example here:
http://dev.openlayers.org/sandbox/context/examples/olon.html

This may be overkill for what you want - WMC or OWS Context are 
certainly more "standard".

This also would take a bit to get in to the trunk - so really just a 
heads up.  If you're interested though, it would be good to know that 
there is interest in it.

Tim

Burgholzer,Robert wrote:
> I am interested in developing a parser that would take a block of XML 
> describing a map view (maybe SLD notation?) and turn it into
OpenLayers 
> javascript code.  Once I have done this, I would like to turn it into
a 
> WordPress plugin, so that maps can be dynamically added to blogs,
real, 
> custom maps that is.  The things I think I need to know before
starting 
> this are:
> 
>  
> 
>    1. Is there already something out there that does this?
>    2. What format is considered the best standard, SLD, or some other?
>    3. Is this interesting to others as well?
> 
>  
> 
> Thanks!
> 
>  
> 
> Robert W. Burgholzer
> 
> Surface Water Modeler
> 
> Office of Water Supply and Planning
> 
> Virginia Department of Environmental Quality
> 
> rwburgholzer at deq.virginia.gov <mailto:rwburgholzer at deq.virginia.gov>
> 
> 804-698-4405
> 
> Open Source Modeling Tools:
> 
> http://sourceforge.net/projects/npsource/
> 
>  
> 
> !DSPAM:4033,4821de30247638362916074!
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 
> 
> !DSPAM:4033,4821de30247638362916074!

_______________________________________________
Dev mailing list
Dev at openlayers.org
http://openlayers.org/mailman/listinfo/dev



More information about the Dev mailing list