i tried figure out how zoom map box bounds couldn't find example. tried
angular.extend($scope, { offset: 0, center: { lat: 30.0047, lon: 31.2586, bounds: [30.566461328125, 29.766565657014183, 31.950738671875005, 30.242264176913594] } });
how can set themap zoom bounding box without complicate conversion of 4 bounds (center, zoom)?
i'm pretty sure want
map.getview().fit( ol.proj.transformextent([ x1, y1, x2, y2 ], 'epsg:coords', 'epsg:map'), map.getsize() );
this after map exists, not on initialization.
Comments
Post a Comment