Hi,<div><br></div><div>I have a vector layer with several polygons. </div><div>Is there a way to zoom to the layer?</div><div><br></div><div>Right now, I take all the features from the layer (one by one), get their bounds and  keep the minimum left and bottom, and the maximum right and top.</div>
<div><br></div><div>Then I  can create a new Bounds  and move the map with zoomToExtent (new Bounds(...))</div><div><br></div><div>Is there a better way to do this?.</div><div><br></div><div>Thanks in advance.</div>