1/*DCM++ © Dominique Cavailhez 2012. 2 * Published under the Clear BSD license. 3 * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full text of the license. */ 4 5/** 6 * @requires OpenLayers/Control/Navigation.js 7 */ 8 9/** 10 * Class: OpenLayers.Control.SaveFeature 11 * Create an instance of OpenLayers.Control.Navigation that completely remove a feature 12 * 13 * Inherits from: 14 * - <OpenLayers.Control.Navigation> 15 */ 16 17OpenLayers.Control.VisuGPXViewFeature = OpenLayers.Class(OpenLayers.Control.Navigation, { 18 activate: function () { 19 var r = OpenLayers.Control.Navigation.prototype.activate.apply(this,arguments); 20 21 if (this.layer.features.length>0) { 22 var format = new OpenLayers.Format.GPX({ 23 'internalProjection': this.map.baseLayer.projection, 24 'externalProjection': new OpenLayers.Projection('EPSG:4326') 25 }); 26 27 var data=format.write(this.layer.features); 28 // fixe bug sous Chrome qui rajoute de prefixes gpx: 29 data=data.replace(/gpx\:/gi,""); 30 OpenLayers.Util.getElement('datavisugpx').value = data; 31 form = OpenLayers.Util.getElement('formvisugpx') 32 form.submit(); 33 } 34 35 this.deactivate(); 36 37 return r; 38 }, 39 40 CLASS_NAME: "OpenLayers.Control.VisuGPXViewFeature" 41});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.