ucdavis / wayfinding

jQuery plugin for interactive svg maps
100 stars 58 forks source link

Pan and zoom #54

Open pdring opened 6 years ago

pdring commented 6 years ago

Hi,

Is there a way to add pan and zoom functionality to the map? It would be useful to be able to define a set area for a large plan and be able to pan and zoom within it.

Thanks.

jraller commented 6 years ago

Did you set 'pinchToZoom': true in the config and include jquery.panzoom?

pdring commented 6 years ago

Hi,

I have added 'pinchToZoom': true and included jquery.panzoom (see attached).

However I don't see any reference to panzoom in the Wayfinding code. I'm currently using Wayfinding v0.2.0.

screen shot 2017-11-21 at 14 24 03 screen shot 2017-11-21 at 14 24 16

jraller commented 6 years ago

Do you mean version v2.0.0?

pdring commented 6 years ago

I seem to have been using a much older version (0.0.2). I have now found the 2.0.0 version with pinchToZoom and I’ll take a look at this version.

For my project, I need to be able to programatically centre the map on a specific zone. Is this possible?

On 21 Nov 2017, at 17:50, Jason Aller notifications@github.com wrote:

Do you mean version v2.0.0?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ucdavis/wayfinding/issues/54#issuecomment-346089178, or mute the thread https://github.com/notifications/unsubscribe-auth/APcCWCM9KZD1tjuD6XqLxrNmds8zIJYgks5s4v9zgaJpZM4Qk9C0.

smarkdurbin commented 6 years ago

I set pinchToZoom to true and included a script tag for the latest version of jquery.panzoom--does not allow panning/zooming with click or touch.