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:
@@ -62,18 +62,21 @@
|
||||
]);
|
||||
var styleMap = new OpenLayers.StyleMap({"default": style});
|
||||
|
||||
var options = {
|
||||
handlerOptions: {
|
||||
layerOptions: {styleMap: styleMap},
|
||||
persist: true
|
||||
}
|
||||
};
|
||||
measureControls = {
|
||||
line: new OpenLayers.Control.Measure(
|
||||
OpenLayers.Handler.Path, options
|
||||
),
|
||||
OpenLayers.Handler.Path, {
|
||||
persist: true,
|
||||
handlerOptions: {
|
||||
layerOptions: {styleMap: styleMap},
|
||||
}
|
||||
}),
|
||||
polygon: new OpenLayers.Control.Measure(
|
||||
OpenLayers.Handler.Polygon, options
|
||||
OpenLayers.Handler.Polygon, {
|
||||
persist: true,
|
||||
handlerOptions: {
|
||||
layerOptions: {styleMap: styleMap}
|
||||
}
|
||||
}
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user