Ticket #248 (closed enhancement: fixed)
New widget for recentering on coordinates
| Reported by: | alex | Owned by: | fredj |
|---|---|---|---|
| Priority: | major | Milestone: | 1.1 Release |
| Component: | General.client | Version: | SVN |
| Keywords: | Cc: | ||
| State: | Review |
Description
Hello,
attached is a patch adding a widget that allows users to recenter anywhere on the map by providing coordinates and, optionally, a scale picked in the predefined scales list.
The widget may be integrated using some code like:
var locatePanel = {
title: OpenLayers.i18n('Locate'),
items: {
xtype: 'coordsrecenter',
border: false,
scales: foo.config.scales,
//defaultScale: 4,
showCenter: true,
map: foo.map.map
}
};
Some optional config parameters are available:
- scales: list of available scales. If not provided, the scale selection combo is not displayed.
- defaultScale: default scale to zoom to if no scale info is provided (for instance with above scale selection combo). If no scale value is detected using this parameter or the scale selection combo, current scale is used.
- showCenter: boolean indicating if a vector cross must be displayed on the recentering point.
UI strings translations are provided in the patch (en, fr, de). Note that "de" strings are simply copied from the "en" strings (not actually translated).
