Hi group.
I need to implement the functionality where the map automatically zoom's to
a feature after the map is loaded.
Thus, my url will look something like this:
http://host/MapViewer.php?SelectedUnit=123
The request parameter is the value of the 'unit' attribute in my layer.
Is there a way
Hi Herman,
maybe you're looking for s.th. like this:
get the bounds of a feature:
var bounds = features[i].geometry.getBounds();
calculate zoom and zoom to the feature::
var desiredZoom = map.getZoomForExtent(bounds);
map.setCenter(bounds.getCenterLonLat(), desiredZoom);
for more information