camptocamp / cgxp

22 stars 22 forks source link

Zoom to the feature extent instead of recentering #1100

Closed fredj closed 8 years ago

sbrunner commented 8 years ago

Is it a good idea for points?

eleu commented 8 years ago

For points, to be coherent, it should be the same behaviour as for a WFS Permalink. f.e. https://geomapfish-demo.camptocamp.net/1.6/theme/Transport?wfs_layer=fuel&wfs_osm_id=303903676

fredj commented 8 years ago

Test with: https://geomapfish-demo.camptocamp.net/2.0/edit?debug&edit_layer=69&edit_id=33

If it's a point, the map in centered and zoomed to the maximum zoom level

sbrunner commented 8 years ago

If it's a point, the map in centered and zoomed to the maximum zoom level

Yes and we usually don't want that ...

In the wfs permalink we configure a zoom for points: https://github.com/camptocamp/cgxp/blob/master/core/src/script/CGXP/plugins/WFSPermalink.js#L407

fredj commented 8 years ago

New version: the zoom level when reentering to a point is now configurable (default is 9)

sbrunner commented 8 years ago

Looks good, merge when Travis is happy :-)

fredj commented 8 years ago

Thanks for the review