[OpenLayers-Dev] Features, Styling and Rendering

Christopher Schmidt crschmidt at metacarta.com
Thu Nov 22 09:21:31 EST 2007


On Thu, Nov 22, 2007 at 03:09:37PM +0100, Andreas Hocevar wrote:
> > > And isn't drawing markers just a
> > > different way of rendering point geometries? So maybe, instead of a
> > > Feature having a Marker, Feature should be the same as Feature.Vector,
> >                                             ^^^^^
> >
> > You mean Marker here, don't you?
> 
> No, I mean OpenLayers.Feature. Currently, we have OpenLayers.Feature
> and OpenLayers.Feature.Vector, and my question was if those should
> maybe be merged into one (again, nothing to be concerned of before
> 3.0). 

Absolutely. The fact that there are two different implementations of
Feature -- or that Vector features are 'Feature.Vector' -- is somewhat 
silly, but is led by my attempt to make things as familiar as possible. 

> I would totally agree, if only vector layers would not prevent click
> and hover events from being received by layers below
> (http://trac.openlayers.org/ticket/434). With points rendered as
> images, you can have several marker layers and do click action on any
> of them. With points rendered as vectors, you can only have that in
> the uppermost layer. Unfortunately, I do not have an idea on how to
> change vector layers in a way that would allow to receive click/hover
> events on more than one layer.

I think we have some ideas for that: Specifically, the geometry
intersection code that Tim was working on may make it in at some point.
If that happens, we no longer need to depend entirely on browser events
for capturing clicks, and we can do more fancy things with select
controls. 

However, there is still a significant disconnect between markers --
which use events registered per item -- and Features, that will be hard
to reconcile.

There's also the fact that Safari 2 is still prominent -- heck, I
consider Safari 1.3 supported -- and doesn't have SVG support. Until
then, we have a need to support the markers/SVG dichotomy. (I say this
speaking for all our users, and especially MetaCarta, for whom the
ability to put markers on the map is imperative.) 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list