The features where the map will be centered
Optional
options: JPanAndZoomOptionsparameter to customize the animation, padding, and/or maxZoomLevel
Error if bad parameters are passed
// first select some features on layer id=3
const features = JMap.Map.Selection.getSelectedFeaturesForLayer(3) // returns layer id=3 selected features
// Move and zoom to display the features
JMap.Map.fitFeatures(features)
// The same with optional parameters
JMap.Map.fitFeatures(features, {
animate: false, // default true
paddingTop: 120, // default 50
paddingLeft: 100, // default 50
paddingRight: 100, // default 50
paddingBottom: 120, // default 50
maxZoom: 10 // default the current zoom
})
JMap.Map.fitFeatures
Move and zoom (or unzoom) to display the given features.