[Users] storing extra properties on layers
Matt Priour
mpriour at kestrelcomputer.com
Tue Feb 17 19:32:12 CET 2009
I agree with Andreas.
I am using a very similar approach in an application that I'm developing.
I've created a "LayerManger" class that holds all of these references. The
layer tree is built from this object, and it is also used to hold the
metadata & extra properties for each layer.
Matt Priour
Kestrel Computer Consulting
www.kestrelcomputer.com
--------------------------------------------------
From: "Andreas Hocevar" <ahocevar at opengeo.org>
Sent: Tuesday, February 17, 2009 12:03 PM
To: "Bart van den Eijnden (OSGIS)" <bartvde at osgis.nl>
Cc: <users at geoext.org>
Subject: Re: [Users] storing extra properties on layers
> Hi,
>
> Bart van den Eijnden (OSGIS) wrote:
>> I had a discussion with Patrick Valsecchi on the MapFish list a while
>> back about storing extra properties on an OpenLayers.Layer object (in my
>> case OpenLayers.Layer.WMS). I currently do this a lot, like metadataURL,
>> legendURL, the result of a WMS DescribeLayer request, or the result of a
>> WFS DescribeFeatureType request (i.e. the structure returned by the
>> parser).
>>
>> He says it's not done to store extra properties on an object from a
>> different library, and I can see his point.
>
> I agree that it is important to have this metadata available somewhere,
> and I also have bad feelings about tagging properties to objects of
> foreign libraries.
>
>> How do we plan to handle this in GeoExt? Do we create a Layers widget
>> which will hold this extra info and keep it up to synch?
>
> Two alternatives come to my mind:
>
> 1) a LayerStore that is always in sync with the map's layers array. Its
> recors have a reference to a leayer, plus all this required information.
> It would also make things like LayerTree more convenient to develop/use,
> because we don't always need a reference to the map, just to our
> LayerStore.
>
> 2) a metadata property added to the OpenLayers Layer API, where everyone
> can store what they want.
>
> Personally, I'd be in favor of 1).
>
> Regards,
> Andreas.
>
>>
>> I'd love to hear some opinions on this. TIA.
>>
>> Best regards,
>> Bart
>>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list