AnsweredAssumed Answered

Is it possible to make a custom pan/zoom function without using the dijit Bookmarks widgets?

Question asked by jquinada on Sep 1, 2016
Latest reply on Sep 1, 2016 by jquinada

I am trying to make some custom bookmarks that just involve html buttons and manipulating the map object. I don't want to use the digit Bookmarks widgets. The various pan methods in the Javascript API (panRight, panLeft, panUp, etc) are sort-of what I want, but you cannot specify exactly where to go. I've also tried using the centerAt(evt.mapPoint) method, which is also sort-of what I want, however, I'm having difficulty calling the centerAt method outside of the require function (which is what I need to do for my dijit-free bookmarks). If I put it outside the require function it doesn't work, and if I try to put it in a function inside the require function, the map does not draw. What I would like to do is something like this:


map.pan(x-coored, y-coord);


Hope that made sense.