[Commits] r2882 - in sandbox/mapgears/geoext.ux/ux/ZoomTo: examples lib/GeoExt.ux/widgets resources/lang
commits at geoext.org
commits at geoext.org
Wed Jul 4 21:01:17 CEST 2012
Author: adube
Date: 2012-07-04 21:01:17 +0200 (Wed, 04 Jul 2012)
New Revision: 2882
Modified:
sandbox/mapgears/geoext.ux/ux/ZoomTo/examples/ZoomToExample.js
sandbox/mapgears/geoext.ux/ux/ZoomTo/lib/GeoExt.ux/widgets/ZoomTo.js
sandbox/mapgears/geoext.ux/ux/ZoomTo/resources/lang/fr.js
Log:
ZoomTo ux - reverseCoordinates new option, x y -> longitude latitude
Modified: sandbox/mapgears/geoext.ux/ux/ZoomTo/examples/ZoomToExample.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/ZoomTo/examples/ZoomToExample.js 2012-05-30 13:22:01 UTC (rev 2881)
+++ sandbox/mapgears/geoext.ux/ux/ZoomTo/examples/ZoomToExample.js 2012-07-04 19:01:17 UTC (rev 2882)
@@ -39,7 +39,8 @@
zoomTo = new GeoExt.ux.ZoomTo({
'projectionStore': projStore,
'defaultZoomLevel': 10,
- 'map': map
+ 'map': map,
+ 'reverseCoordinates': false
});
toolbar.add(zoomTo);
Modified: sandbox/mapgears/geoext.ux/ux/ZoomTo/lib/GeoExt.ux/widgets/ZoomTo.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/ZoomTo/lib/GeoExt.ux/widgets/ZoomTo.js 2012-05-30 13:22:01 UTC (rev 2881)
+++ sandbox/mapgears/geoext.ux/ux/ZoomTo/lib/GeoExt.ux/widgets/ZoomTo.js 2012-07-04 19:01:17 UTC (rev 2882)
@@ -27,10 +27,10 @@
zoomToText: "ZoomTo",
/** api: config[xCoordinateText] ``String`` i18n */
- xCoordinateText: "X coordinate",
+ xCoordinateText: "Longitude",
/** api: config[yCoordinateText] ``String`` i18n */
- yCoordinateText: "Y coordinate",
+ yCoordinateText: "Latitude",
/** api: config[projectionText] ``String`` i18n */
projectionText: "Projection",
@@ -82,6 +82,13 @@
*/
enableDrag: false,
+ /** public: property[reverseCoordinates]
+ * ``Boolean``
+ * Defaults to false. Whether to display the coordinates in reverse order.
+ * Normal: X, Y (Lon, Lat). Reverse: Y, X (Lat, Lon).
+ */
+ reverseCoordinates: false,
+
/** public: property[showCenter]
* ``Boolean``
* If set to true, shows a red cross marker on the center of the map
@@ -203,6 +210,38 @@
this.currentProjection = defaultProj;
// FormPanel
+ var items = [{
+ fieldLabel: this.projectionText,
+ name: 'projection',
+ value: defaultProj,
+ xtype: 'combo',
+ store: this.projectionStore,
+ displayField: 'projection',
+ typeAhead: true,
+ mode: 'local',
+ forceSelection: true,
+ triggerAction: 'all',
+ allowBlank: false,
+ invalidText: this.invalidEntryText,
+ emptyText: "",
+ selectOnFocus:true,
+ listeners: {
+ "select": this.onProjectionSelect,
+ scope: this
+ }
+ }];
+ var xField = {
+ fieldLabel: this.xCoordinateText,
+ name: 'coordx'
+ };
+ var yField = {
+ fieldLabel: this.yCoordinateText,
+ name: 'coordy'
+ };
+ this.reverseCoordinates && items.push(yField);
+ items.push(xField);
+ !this.reverseCoordinates && items.push(yField);
+
this.form = new Ext.form.FormPanel({
border: false,
plain: true,
@@ -210,33 +249,7 @@
defaultType: 'textfield',
labelAlign: 'top',
bodyStyle:'padding:5px 5px 0',
- items: [{
- fieldLabel: this.projectionText,
- name: 'projection',
- value: defaultProj,
- xtype: 'combo',
- store: this.projectionStore,
- displayField: 'projection',
- typeAhead: true,
- mode: 'local',
- forceSelection: true,
- triggerAction: 'all',
- allowBlank: false,
- invalidText: this.invalidEntryText,
- emptyText: "",
- selectOnFocus:true,
- listeners: {
- "select": this.onProjectionSelect,
- scope: this
- }
- },{
- fieldLabel: this.xCoordinateText,
- name: 'coordx'
- },{
- fieldLabel: this.yCoordinateText,
- name: 'coordy'
- }
- ]
+ items: items
});
var windowButtons = [];
Modified: sandbox/mapgears/geoext.ux/ux/ZoomTo/resources/lang/fr.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/ZoomTo/resources/lang/fr.js 2012-05-30 13:22:01 UTC (rev 2881)
+++ sandbox/mapgears/geoext.ux/ux/ZoomTo/resources/lang/fr.js 2012-07-04 19:01:17 UTC (rev 2882)
@@ -2,8 +2,8 @@
if (GeoExt.ux.ZoomTo) {
Ext.apply(GeoExt.ux.ZoomTo.prototype, {
zoomToText: "Zoomer",
- xCoordinateText: "Coordonnée X",
- yCoordinateText: "Coordonnée Y",
+ xCoordinateText: "Longitude",
+ yCoordinateText: "Latitude",
projectionText: "Projection",
invalidEntryText: "entrée invalide",
widgetTitleText: "Outil de zoom sur coordonnées",
More information about the Commits
mailing list