Adding a persist option to the measure control. This passes the same to the sketch handler. The cancel method on the control calls the same on the handler. Patch from dwins. Tests from me. r=me (closes #2029)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9225 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-04-07 02:03:57 +00:00
parent d3d80a02a9
commit ed5420b678
7 changed files with 120 additions and 16 deletions

View File

@@ -185,8 +185,8 @@ OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, {
* {<OpenLayers.Geometry.LineString>}
*/
getGeometry: function() {
var geometry = this.line.geometry;
if(this.multi) {
var geometry = this.line && this.line.geometry;
if(geometry && this.multi) {
geometry = new OpenLayers.Geometry.MultiLineString([geometry]);
}
return geometry;