[OpenLayers-Users] Map moveend event fires twice if zoomed
Eric Lemoine
eric.lemoine at camptocamp.com
Tue Dec 4 22:57:21 PST 2012
On Wed, Nov 28, 2012 at 6:27 PM, Tondo <gpktondo at gmail.com> wrote:
> Hi Lists,
>
> is it just a bug, or it is supposed to rise MoveEnd event once when panning
> but twice when zooming?
>
> /_map.events.on({
> moveend: function ()
> {
> var bbox = _map.getExtent().toArray();
> var denominator = _map.getScale();
> alert("CALL0"); // Alerts twice whne zoomed
> if (originBBox[0] > bbox[0] || originBBox[1] > bbox[1] ||
> originBBox[2] < bbox[2] || originBBox[3] < bbox[3] || originBBox[4] !==
> denominator)
> {
> originBBox = newOriginBox(bbox, denominator);
> loadGeometry(originBBox);
> }
> }
> });/
>
> Thanks,
> Tom
I just tried on <http://www.openlayers.org/dev/examples/wms.html>
(using `map.events.on({moveend: function() { console.log('moveeend');
}})` on the console) and I'm not reproducing the problem.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 94
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list