Search code examples
panhighmaps

Highmaps: Panning programmatically


Is there a function in Highmaps to pan the map programmatically, such as panBy in GoogleMaps?

I would like to pan a div that is above my map and pan the map programmatically to follow my div.

I found a pan function in Highmaps library, but it doesn't seem to work the way I need.

Here is the fiddle with the example: http://fiddle.jshell.net/6ujbf42y/19/


Solution

  • I was able to do what I needed. I copied the pan function from the Highmaps code and made some adjustments to work as I needed. Basically, it uses the setExtremes function of the Highmaps to move the map.