[OpenLayers-Users] fire an event only once on either zoomend or moveend

Puneet Kishor punk.kish at gmail.com
Mon Feb 6 23:42:43 EST 2012


I want to have an event fire only once on zoomend or on moveend.

If I do

	"eventListeners": {
                    "zoomend": mapEvent
                }

it fires only when I zoom in or out. On the other hand, if I do

	"eventListeners": {
		    "moveend": mapEvent,
                    "zoomend": mapEvent
                }


then while it fires only once on panning the map, it fires twice on zoom in or out. How can I make it so it fires only once whether it is moveend or zoomend?

--
Puneet Kishor 


More information about the Users mailing list