[OpenLayers-Users] vector popups misaligned after resize & switching of google layers (with fix for Ticket #1797 applied)

Andreas Hocevar ahocevar at opengeo.org
Thu Apr 23 16:52:35 EDT 2009


I uploaded a new patch for #1797. Can someone please apply it and see if 
it improves things, commenting any findings on the ticket?

Thanks,
Andreas.

RFeagin wrote:
> as a quick workaround, I'm catching the changebaselayer event and doing
> map.pan(-1, -1); to force the map to realign properly.
>
>
> RFeagin wrote:
>   
>> My vector points are staying aligned with the baselayer.  I'm only having
>> a problem with the popup on the first hover after the resize and layer
>> switch.
>>
>>
>> Vivien Deparday wrote:
>>     
>>> Hi,
>>> I encounter a similar behaviour. I've reported it at the end of the 
>>> Ticket #1797.
>>> So far, I didn't have time to dig into the code to try to make a clean
>>> fix.
>>> I have made a very non-satisfactory makeshift fix which is to add :   
>>> this.layer.map.moveTo(this.layer.map.getCenter()); at the line 360 of 
>>> the layerswitcher control.
>>> But I will open a new ticket.
>>> Are you vector features misaligned with your baselayer too or is it only 
>>> the popup?
>>>
>>> Cheers,
>>>
>>> Vivien
>>>
>>>
>>> RFeagin wrote:
>>>       
>>>> The google resizing and switching layers(Ticket #1797) has been a
>>>> problem for
>>>> me in one of my applications.  I saw that 2.8 RC1 had a fix for it, so I
>>>> grabbed the google.js from the 2.8 RC1 and tried using it with my 2.7
>>>> code. 
>>>> I didn't see anything in the changes that looked like it would cause a
>>>> problem.  
>>>>
>>>> Here is what I ran into... I have a point vector layer with hover popups
>>>> using SelectFeature on top of google layers with sphericalMercator =
>>>> true. 
>>>> When I follow the steps listed on the ticket to test the fix, the map
>>>> now
>>>> resizes correctly (thanks) but the first time I hover over a vector, the
>>>> popup is in the wrong location.  So it looks like the map tiles and
>>>> vectors
>>>> are realigning after the resize, but the popups aren't.
>>>>   
>>>>         
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>       
>>     
>
>   


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




More information about the Users mailing list