Hi Roald,

The LayerName/LayerID problem has been there for a long time and it's 
would be great if you can solve it.

Roald de Wit wrote:
> Dear list,
>
> For our CGDI-IP project (that has finished) we run into problems with
> several layers sharing the same name. For the components that we used I
> changed all references to 'layerName' into references to 'layerId' and
> rewrote the [model].getLayer method in OWS context. That solved the
> problems.
>
> I propose to make the following changes in the trunk. These will resolve
> the following long-standing issue:
> http://jira.codehaus.org/browse/MAP-6. Please give your feedback.
>
> 1) Change refences from layerName to layerId in the following files:
> - model/OWSContext.js
> - model/Context.js
> - widget/*.js (where layerName is used)
> - widget/*.xsl (where layerName is used) 
>   
+1
> 2) Change .getLayer in OWSContext.js so it looks for a layer id first.
>   
+1
> 3) Change in as may places as time permits lookups for layers from:
>   [model].doc.selectSingleNode(.... layerName...) 
> to 
>   [model].getLayer(layerId)
>   
how is this different from point 1?
> 4) Create a mechanism to generate a unique id for every layer that
> doesn't have one. I'd like to hear your opinion on whether or not to do
> this and where and how to generate this id (in XSL or in Javascript).
>   
+1 I'm curious how you are going to to this. Since it is not uncommon in 
both WMC and OWSContext to have layers with the same name, it would be 
good to have an auto-UID generator for layers without LayerID.
Since the ID is stored in the context doc, you can pick anything for an 
ID right? I'd do it in javascript and use a timestamp to generate an 
unique ID. The advantage of javascript is that it's easier to debug and 
probably more powerful to generate IDs.

> The changes in the code will have a failsafe mechanism to fallback to
> layerName if layerId does not exist (for layers that don't have a
> layerId).
>   
good to know.
> The id will be part of the new OWS specfication (see email from Cameron
> to the list at Oct 25 and this example:
> http://www.ogcnetwork.net/schemas/owc/0.2.1/owsContext.xml)
>
> I'm planning on starting my work tomorrow and hope to get some feedback
> from the developers.
>
> Kind regards,
>
> Roald
>
>   
Regards,
Steven




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to