﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33637	Regression in feature zoom for MapWidget	Claude Paroz	Claude Paroz	"When I rewrote MapWidget for OpenLayers 3 in [2ebfda38e], the code to autozoom to the initial feature (if present) was changed from:

{{{
this.map.zoomToExtent(feat.geometry.getBounds());
if (this.options.geom_name === 'Point') {
    this.map.zoomTo(this.options.point_zoom);
}
}}}
to:
{{{
this.map.getView().fit(extent, this.map.getSize(), {maxZoom: this.options.default_zoom});
}}}

As a result, the zoom is often the `default_zoom`, which is mostly not adequate at all (not enough zoom). If we simply remove the maxZoom, the zoom is too high for points (hence the `point_zoom` in the initial version). I think instead of `maxZoom`, a `minResolution` (see https://openlayers.org/en/latest/apidoc/module-ol_View-View.html#fit) would be more appropriate.

We would probably need to reintroduce some `point_zoom` variable, as providing a hard-coded value is not an option."	Cleanup/optimization	closed	GIS	4.0	Normal	fixed			Accepted	1	0	0	0	0	0
