Hi
Thanks for your answer.
The 'moveend' works.
It works always after every zoom or drag.
So it is triggered after zooming as well ('zoomend' event)... so there
is, bytheway, no possibility to have exclusive actions.
But, i was looking for the beforeupdate event, these two are
afterupdate.
Lots of handling with lots of layers will fire a double amount of
requests.
I'll stick to line 1057 for now, maybe continue to search ways to
enhance with a new 'beforeupdate' event,
it would have to go off as soon as the new bbox and clicked
point/worldcoordinate is calculated.
Huub
Linda Rawson wrote:
I use
map.events.register(
'moveend',
map, function (e) {
}
)
To find the coordinates after a mouse movement of either a pan
or drag.
Linda
On 9/7/07, Huub
Fleuren <[EMAIL PROTECTED]>
wrote:
Hi
List,
I found a spot we're i could hook in my custom function just before a
mapUpdate after pan or zoom operations (also PanZoomBar)
In Map.js from line1057 onwards you read that there are two pan/zoom
occasions were a map is going to fire al requests again, in other words
before it goes thru all layers that were added to the map.
This is the place were you might want to add some layers dynamically,
that's what we're doing anyway
just call a function there: recalculateLayers(!dragging || zoomChanged)
I was wondering, but couldn't find my way, if there are events that can
be triggered to do this.
There is a list of events in Map.js
why does map.events.register("zoomend") getstriggered (after update)
why does map.events.register("dragend") nowhere get triggered
I saw that i could addEvents, and trigger them like
if (!dragging) { this.events.triggerEvent("movestart"); }
I added "beforeupdate" to the EVENT_TYPES of Map.js
triggered it on Map.js line 1057
implemented the registered event in my application
Did not work
Regards,
Huub
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
|
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users