Hi Steven, Thanks for your response.
>> 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? In 1) I primarily just do a search/replace for layerName to layerId. In 3) I will replace XPath expressions to find a layer by name (like '//wmc:Layer...') by calling the getLayer method (that effectively does the same, but is 'smarter'). >> 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. Thanks, I need input like this. I thought about generating a unique id in XSL, but as you write: Javascript is easier and more powerful for this purpose. Kind regards, Roald ------------------------------------------------------------------------- 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
