Hi Andreas,
This is a tricky one: the layerNames come from the config.xml of the
app. Example: wfs-t:
<OverviewMap id="locatorWidget">
<htmlTagId>locatorMap</htmlTagId>
<width>180</width>
<layers>
<layerName>basic</layerName>
<layerName>topp:tasmania_water_bodies</layerName>
<layerName>topp:tasmania_roads</layerName>
<layerName>topp:tasmania_cities</layerName>
</layers>
</OverviewMap>
For this to work on layers that have an @id, you would have to replace
the node value of the corresponding layer name with the value of the
layer id.
Is that desired functionality? Or should we create a fail safe mechanism
for this as well? Like: try to find the oLlayer by the value of that
node, if not, find the layer in the context, retrieve its @id value and
try to find the oLlayer with that @id.
This leads me to question whether or not we should generate our own @id
at all (in OwsContext for example) when there is none...
Please give me your opionion.
Regards,
Roald
There is no failsafe mechanism in fetching the oLlayer by layerName
On Thu, 2007-11-22 at 17:32 +0100, Andreas Hocevar wrote:
> Roald,
>
> there are some constructs that rely on layer names being keys in
> MapPaneOL.oLlayers, like the following snippet from
> lib/widget/OverviewMap.js
>
> if (objRef.layerNames) {
> for (var i = 0; i < objRef.layerNames.length; i++) {
> for (var j in map.mbMapPane.oLlayers) {
> if (objRef.layerNames[i] == j) {
> // Found it, add a clone to the layer stack
>
> options.layers.push(objRef.getClonedLayer(map.mbMapPane.oLlayers[j],
> isBaseLayer));
> isBaseLayer = false;
> }
> }
> }
> }
>
> I do not know how many of those there are in other files, but those
> will definitely be broken by your changes.
>
> So may I please ask you to look for all references to oLlayers in the
> lib folder, and check if there are constructs like the one above?
>
> Thanks,
> Andreas.
>
--
Roald de Wit
Software Engineer
[EMAIL PROTECTED]
Commercial Support for Open Source GIS Software
http://lisasoft.com/LISAsoft/SupportedProducts/
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel