[OpenLayers-Dev] OpenLayers map.AfterDraw event
kgeusebroek at xebia.com
Sat Nov 7 06:51:00 EST 2009
During foss4g in sydney i wrote a refresh strategy, the patch is
attached to ticket 2317 and will be reviewed shortly. In the mean time
feel free to use it and if you have suggestion for improvements don't
hesitate to mail me.
The strategy can be applied to a vector layer, in the constructor you
supply the amount of milliseconds a refresh is needed and the
layer.refresh method is called every so many milliseconds, if the
visibility is false no refresh is done until the visibility changes
Hope this is of use to you.
From: dev-bounces at openlayers.org [mailto:dev-bounces at openlayers.org] On
Behalf Of geojoe
Sent: Friday, November 06, 2009 9:13 PM
To: dev at openlayers.org
Subject: Re: [OpenLayers-Dev] OpenLayers map.AfterDraw event
The logic I used for the page refresh didn't really work.
It seems that when I use the saved extent in the map Init() function and
call "map.zoomToExtent( lastExtent );" this redraws the last extent
but I can no longer zoom out. This command seems to reset the map
so when I ZoomToMaxExtent() I'm stuck with the current extent.
I am updating a postgres database by adding or moving points and
two views into that database. I've been trying to display the new data
doing an HTML page refresh preserving the last extent.
What I would really like is to have a redraw map control that re-reads
database views to get the updated positions and refreshes the map using
Does a refresh or redraw map control exist that does this? Again, I
been able to find one.
> Thanks for the link.
> As to my other problem - I also save the zoom level on the "moveend"
> and call "map.zoomTo(zoomLevel);" at the end of the map Init()
> This seems to have solved the problem.
> Thanks again Christopher and Andreas for helping an infant in
> Christopher Schmidt-2 wrote:
>> On Fri, Nov 06, 2009 at 05:05:43AM -0800, geojoe wrote:
>>> This seems to work except when I refresh the page I get the extent
>>> map before the current extent.
>>> Is there another event that fires after the map draw that I could
>>> I just started delving into OpenLayers this week. Where can I find
>>> of all of the map events like "moveend"? I haven't been able to
>>> in one place @
>>> View this message in context:
>>> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
>>> Dev mailing list
>>> Dev at openlayers.org
>> Christopher Schmidt
>> Dev mailing list
>> Dev at openlayers.org
View this message in context:
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
Dev mailing list
Dev at openlayers.org
More information about the Dev