[Geomoose-users] GeoMoose core changes?
Jim Klassen
klassen.js at gmail.com
Fri Sep 21 15:19:03 PDT 2012
I am working on Add (WMS) to Map from my CSW Catalog extension and a Visible Layers extensions and I found I need to make some changes to core code.
Taking one step back... I need a way from my CSW catalog to add new layers (map-sources) to the map at runtime. I also need a way to control these layers once they are added. I have decided that it makes more sense to create a visible layers tab (like was in GeoMoose 1.x) that can handle these dynamic layers as well as provide a more intuitive interface for the Up/Down Z-Order problem introduced in 2.x. (For my purposes a layer == a map-source for now, although the nesting of the layers within the map-sources could potentially be added later).
To do this I need a way to add a map-source at runtime and a way to hook into the events such that I can update my Visible Layers tab when something changes (from the regular catalog or from the CSW catalog). I also need to be able to trigger events from the Visible Layers tab (such as move up/down/turn layer off) etc. I think the event framework is (mostly) in place already. Also, adding a layer on the fly directly to the OpenLayers map object works, but then it isn't part of what GeoMoose knows about (for instance GeoMoose.setVisibility would fail because it doesn't have a "path").
At a minimum it looks like I need to change some stuff around in Application.js
For starters I have split configureMapSources into it's outer loop and an inner function that actually creates the map-source. I need this so I can call the later directly from my extensions.
At this point I am looking for thoughts/ideas on how to best not mess things up.
Jim
More information about the Geomoose-users
mailing list