Hi Andreas,

I will be away from work and Internet till Tuesday (moving house). Thanks
a lot for looking into the code.

However, just looking at what you wrote below would tell me that I have
been slack in changing the reference to layerId where you see layerName in
moveLayerDown. That surprises me since I put some effort into assuring
that I did this everywhere. I must have overlooked it.

But I think fetching the OL layer this way: objRef.oLlayers[layerId]
should definitely work. oLlayers is an array and I also store the MB
layers by their layerId in that array (instead of layerName).

Roald

> Hi all,
>
>> -MapPaneOL.prototype.getLayer = function(objRef,layerName) {
>> -  return objRef.model.map.getLayer(objRef.oLlayers[layerName].id);
>> +MapPaneOL.prototype.getLayer = function(objRef,layerId) {
>> +  if(objRef.oLlayers[layerId] && objRef.oLlayers[layerId].id) {
>> +    return objRef.model.map.getLayer(objRef.oLlayers[layerId].id);
>> +  } else {
>> +    return false;
>> +  }
>
> Just saw that this was also in the code before your changes. There
> must be a thing I am missing, maybe you (or anyone else) can explain
> where this .id thing comes from. To me it looks like getLayer cannot
> work because of this.
>
>> -MapPaneOL.prototype.moveLayerUp = function(objRef, layerName) {
>> +MapPaneOL.prototype.moveLayerUp = function(objRef, layerId) {
>>    var map=objRef.model.map;
>> -  map.raiseLayer(objRef.oLlayers[layerName], 1);
>> +  map.raiseLayer(map.getLayer(objRef.oLlayers[layerId].id), 1);
>
> Hm, here the .id is only in your code, not in the old one. And it is
> not in moveLayerDown.
>
> Regards,
> Andreas.
>
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to