You can give your map a movestart event with the following code:

function onpropertychange() {
  map.dispatchEvent('movestart');
  var view = map.getView();
  view.un('propertychange', onpropertychange);
  map.on('moveend', function() {
    view.on('propertychange', onpropertychange);
  });
};
map.getView().on('propertychange', onpropertychange);

I also added this as comment to the ticket, for future reference.

Andreas.

On Thu, Jul 14, 2016 at 2:07 PM, João Rodrigues via OL3 Dev
<ol3-dev+apn2wqcv7oeyepv6hsk0iibaacfj_vja1kyu4arzmhp3d_bm39ihb...@googlegroups.com>
wrote:
> Hi
>
> I have recently started upgrading my GIS app to OpenLayers 3, and realized
> there is no 'movestart' event on the map.
>
> Here is an open issue in the ol3 GitHub about this. It is opened for almost
> a year, and it seems no progress has been made.
>
> https://github.com/openlayers/ol3/issues/3985
>
> Are there any other ways to mimic the 'movestart' event using other events
> in the ol3 map?
>
> I want the 'movestart' event to be triggered when:
>
> there is a pan done manually, with the mouse
> there is a pan triggered programatically
> setCenter is used
> a zoom isperformed (maybe indicating with a flag that it was a zoom and not
> actualy a move/pan, like in ol2)
>
> I would appreciate some help, please.
>
> Thanks a lot
>
> --
> You received this message because you are subscribed to the Google Groups
> "OL3 Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/ol3-dev.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ol3-dev/0ef6b938-5dbe-418b-9625-2115693b846a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Andreas Hocevar
Geospatial Solutions Engineer | Boundless
[email protected]
@boundlessgeo

-- 
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/CAOiJ94jhLAxopNY%2BSHAqrXibM9i4QYbiYSzOfxGFzt9t3wEy5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to