Scrolls the map by the specified amount.
Namespace: MindFusion.Mapping
Package: MapView.js
JavaScript Copy Code |
---|
function scrollBy (x, [y]) |
Number. The number of pixels to scroll horizontally.
Number. The number of pixels to scroll vertically.
The following example creates a new MapView using a <DIV> element called "mapview" that we've declared in the HTML code of the page. It adds a new MapLayer and scrolls by 100 pixels in both directions:
JavaScript Copy Code |
---|
// create a new instance of the mapView // create a map layer view.scrollBy(100, 100); |