[OpenLayers-Dev] Bug in the 2.8 RC6? (ticket #1797)

Andreas Hocevar ahocevar at opengeo.org
Fri Jun 19 04:05:57 EDT 2009


Hi Vivien,

the solution to these resize problems is maybe to use just one GMap
object and change its map type. This is a bit quirky and non-api at
the moment (i.e. one layer for all types instead of one layer per
type), but maybe future attempts to tackle the issue should go into
this direction:

myGoogleLayer.type = G_SATELLITE_MAP;
myGoogleLayer.setMapType();
// now we have a satellite map

myGoogleLayer.type = G_HYBRID_MAP;
myGoogleLayer.setMapType();
// now we have a hybrid map

Hope this helps, and if anyone wants to create a patch to make this
more consistent with the API, I'd be willing to mentor and review. I
have the feeling that the right way to do it would be to store the
mapObject as property on the prototype when first requested, and
instances only do the mapType handling in setVisibility. This would
also be a good step towards memory efficiency.

Regards,
Andreas.

On Thu, Jun 18, 2009 at 9:39 PM, Vivien
Deparday<vivien.deparday at gmail.com> wrote:
> It can also be reproduced  when you make it larger: load the page,
> switch to the street layer, press F11, switch back to the physical layer
> and it happens. However, I agree that it's likely not only or maybe not
> at all Openlayers' fault and it's tricky to locate where the issue is.
> It was just to report this issue that hinders the use of google layers.
> Concerning the misaligned vector layer after switching layers, I'll try
> to minimize my application but I feel like it's due to an interaction
> with ExtJS so I will post on GeoExt mailing when I find something.
>
> Regards,
>
> Vivien
>
>
> Andreas Hocevar wrote:
>> Hi Vivien,
>>
>> On Thu, Jun 18, 2009 at 5:42 PM, Vivien
>> Deparday<vivien.deparday at gmail.com> wrote:
>>
>>> I can still reproduce the error but it doesn't happen at every manual
>>> resize with the two examples. Sometimes I have to play more with
>>> resizing the window and the layer switcher. I found a sequence that
>>> makes it happen every time with the basic example from gregers  (after
>>> removing width and height style of the map div) :  load the page,  press
>>> F11, switch to google streets layer, press F11, switch back to google
>>> physical and there  you should have the bug. It also happens in many
>>> other resizing and layer switcher uses.
>>> Let me know if you can reproduce.
>>>
>>
>> Yes, _this_ I can reproduce. And it seems to be a new issue. Until
>> now, we only encountered problems when making the map _larger_. This
>> one happens when we make it _smaller_. I cannot help, but I have the
>> impression that everytime we revisit #1797, there are new issues, and
>> it always behaves different with OL 2.7 and 2.8, but never completely
>> right. I doubt that this is just OpenLayers' fault.
>>
>> Regards,
>> Andreas.
>>
>>
>>> Viv
>>>
>>> Andreas Hocevar wrote:
>>>
>>>> Hi Vivien,
>>>>
>>>> On Thu, Jun 18, 2009 at 6:04 AM, Vivien
>>>> Deparday<vivien.deparday at gmail.com> wrote:
>>>>
>>>>
>>>>> Hello,
>>>>> sorry to talk about this ticket yet again but I still have an issue.
>>>>> This issue can be reproduced with the example attached to the ticket
>>>>> #1797 with Firefox 3. When clicking the button resize of the example
>>>>> (which changes the div size and execute map.updateSize), it now works.
>>>>> However, if you resize manually the Firefox window (by manually I mean
>>>>> with the handle at the bottom right-hand corner or with the
>>>>> resize/maximize button beside the close button or when you use the full
>>>>> screen mode by pressing F11) and then switch the layer, all the tiles
>>>>> don't get refreshed. You have to resize the window again and then it
>>>>> works. You can also reproduce this with the example I attached to the
>>>>> ticket #2055. In this case, the vector layer is also misaligned.
>>>>>
>>>>>
>>>> Ok, I tried with the example attached to #1797, after removing the
>>>> width and height styles of the map div. Works fine. Then I tried with
>>>> the exmaple attached to #2055, modified the paths and proxy to make it
>>>> work in my environment, and also cannot reproduce the issue.
>>>>
>>>>
>>>>
>>>>
>>>>> Let me know if you can reproduce this issue with the two examples and if
>>>>> you would need me to minimize my application to help solving this issue.
>>>>> Hopefully, it's not worth delaying the release of the 2.8.
>>>>>
>>>>>
>>>> I cannot reproduce the issue. The problem with the GMaps API is that
>>>> their JS can change any time, so it is hard to reproduce these things
>>>> in general. I do not think it is worth delaying the release of 2.8.
>>>>
>>>> Regards,
>>>> Andreas.
>>>>
>>>>
>>>>
>>>>> Cheers,
>>>>>
>>>>> Vivien
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> Dev at openlayers.org
>>>>> http://openlayers.org/mailman/listinfo/dev
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at openlayers.org
>>> http://openlayers.org/mailman/listinfo/dev
>>>
>>>
>>
>>
>>
>>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Dev mailing list