Changeset 1939
- Timestamp:
- 03/09/10 12:07:06 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/fvanderbiest/geoext.ux/ux/Measure/examples/Measure.js
r1937 r1939 7 7 var measureLength = new GeoExt.ux.MeasureLength({ 8 8 map: map, 9 controlOptions: { 10 geodesic: true 11 }, 9 12 toggleGroup: 'tools' 10 13 }); sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.js
r1936 r1939 28 28 29 29 /** api: config[styleMap] 30 * ``OpenLayers.StyleMap`` Optional StyleMap for the sketches 30 * ``OpenLayers.StyleMap`` Optional StyleMap for the sketches. 31 */ 32 33 /** api: config[controlOptions] 34 * ``Object`` Options for Measure control. 31 35 */ 32 36 … … 53 57 constructor: function(handler, config) { 54 58 config.control = this.buildControl({ 55 handler: handler, 59 handler: handler, 60 options: config.controlOptions || {}, 56 61 styleMap: config.styleMap || this.styleMap() 57 62 }); 58 63 delete config.styleMap; 64 delete config.controlOptions; 59 65 if (typeof(config.template) == "string") { 60 66 this.template = new Ext.XTemplate(config.template, { … … 77 83 * - handler: a reference to the OpenLayers.Handler class. 78 84 * - styleMap: an OpenLayers.StyleMap for sketches. 85 * - options: control options to override default ones. 79 86 * 80 87 * :return: ``OpenLayers.Control.Measure`` The configured control. … … 87 94 }; 88 95 return new OpenLayers.Control.Measure( 89 options.handler, {96 options.handler, Ext.apply({ 90 97 persist: true, 91 98 eventListeners: listeners, … … 95 102 } 96 103 } 97 } 104 }, options.options) 98 105 ); 99 106 },