[OpenLayers-Users] XML / GeoRSS / GML / KML and combined layers (Markers & SVG)

Christopher Schmidt crschmidt at metacarta.com
Wed Sep 19 07:13:02 EDT 2007


On Wed, Sep 19, 2007 at 10:43:33AM +0100, mike wrote:
> Hi,
> 
> Is there any documentation of the merits / purpose and intended future
> developments of the various XML layers such as GeoRSS, GML, KML etc?

Well, the versions in 2.4 were very minimal: Primarily designed to get
people started. Specifically, KML had no polygon support, and was
readonly, GeoRSS was write only, etc. The resutl of this, however, was
that in 2.5 we got both of those fixed: GeoRSS is now a full Atom/RSS
GeoRSS Simple parser, KML supports all KML 2.1 Geometries, etc.

I have no idea if our GML parser is *valid*, but it has always been the
most complete, I believe because its development was funded as part of
Cameron Shorter's OWS Testbed work. (I could be wrong on this.)  

> They seem to be very similar and almost interchangable, and I'm
> finding this a bit confusing.

Some day in the distant future, when OpenLayers does everything you need
and new features are just a memory, all Vector Formats will have a
complete mapping of their formats into OpenLayers constructs as best as
the client is able. (This does mean that there are many things that they
will be missing -- For example, we will not be representing the altitude
of KML features in OpenLayers, so far as I can predict.) 

At the moment, they are as complete as people have wanted to make them,
and no more. In some casees (GML, via OGC, and soon I believe KML via
the OWS-5 work), specific Formats have gotten a boost due to outside
funding of development, thus they may be more complete. In other cases
(GeoJSON) the spec is relatively complete and simple in and of itself,
and the authors of the spec happen to be OpenLayers contributors.

> For example, I'm using GeoRSS to draw markers, and KML to draw lines.
> However, this excellent GeoRSS Serialise example seems to be an edit /
> draw component for lines and polys:
> http://dev.openlayers.org/sandbox/ahocevar/sldRenderer/examples/georss-serialize.html

There's actually probably no reason that you *have* to use GeoRSS to
draw markers anymore: it could be done with just a little bit of styling
work on a vector layer. It's not trivial yet, because there is no
pressing business case telling me why I should do it, and presumably no
one else has had one either.

> Equally, KML boasts support for styles, although this is not
> implemented yet, and if we are accepting the Google definition, then
> KML should support both markers and lines / polys.

I'm assuming when you say "KML boasts support", you don't mean within
OpenLayers, but in general. If we accept that, we should also support
Photo Overlays and 3D. We can't do that :)  However, mapping the full
set of KML data that *can* be represented into OpenLayers is the
eventual goal: just not neccesarily a high priority.

> Is there a twiki page for this or a good resource I could refer to?
> I'm considering developing this further and I'd like to make sure I'm
> doing the right thing before I start...  Also if anyone if actively
> developing in this area I'd be very interested to discuss and see if I
> can help.

Not really. Docs are the weakest point on the project, but if you have
specific questions I'm glad to answer them, and you can turn them into a
wikipage. Also, I'm often on IRC, irc.freenode.net, #openlayers, as are
40+ other extremely intelligent contributors to the project, many of
whom would be glad to help.   

> My other point is about combined layers - I'd like to create a layer in the
> layerswitcher which shows markers and lines / polys (i.e. SVG I assume).  Is
> it possible to make a combined layer or wrap two layers into one in some
> way?

Several. But it's likely that you just want to use a Vector layer with
an externalGraphic: see the vector-features.html page for styling
examples. (The only time this wouldn't be true is if you were required
to support Safari 2.)  

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list