Zoomend event in openlayers 3

Zoomend event in openlayers 3

Share this post

Comments (2)

  • Me Reply

    This is not working for me.
    How did you define var as var = currentZoomLevel;
    Also for what kind of version of OpenLayers3 is this?

    August 30, 2016 at 3:47 pm
    • jongarrido Reply

      Hi,

      Thanks for your comment.

      You’re right the code must be

      var currentZoomLevel;

      (I’ve modified the post)

      It’s just to define a global variable.

      Take care that a trigger is defined using jquery , so jquery must be loaded.

      I think this code will run in any version of openlayers 3.x

      $(document).trigger(“zoomend”, zoomend_event);

      August 30, 2016 at 6:51 pm

Leave a Reply

Your email address will not be published. Required fields are marked *