diff --git a/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-all-options.html b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-all-options.html index 59e9787ab..c10ca14d5 100644 --- a/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-all-options.html +++ b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-all-options.html @@ -115,7 +115,7 @@

Ajout des outils de dessin avec options

if (feature) { - var coord = evt.coordinates; + var coord = evt.coordinate; var props = feature.getProperties(); // Offset the popup so it points at the middle of the marker not the tip popup.setOffset([0, -22]); diff --git a/src/OpenLayers/Controls/Drawing.js b/src/OpenLayers/Controls/Drawing.js index ede3e0ee2..615bfe4d6 100644 --- a/src/OpenLayers/Controls/Drawing.js +++ b/src/OpenLayers/Controls/Drawing.js @@ -1334,6 +1334,7 @@ var Drawing = (function (Control) { case this._addUID("drawing-tool-point"): if (context.dtOptions["points"].active) { context.interactionCurrent = new DrawInteraction({ + stopClick : true, features : context.layer.getSource().getFeaturesCollection(), style : new Style({ image : new Icon(this._getIconStyleOptions(this.options.markersList[0])) @@ -1350,6 +1351,7 @@ var Drawing = (function (Control) { case this._addUID("drawing-tool-line"): if (context.dtOptions["lines"].active) { context.interactionCurrent = new DrawInteraction({ + stopClick : true, features : context.layer.getSource().getFeaturesCollection(), style : new Style({ image : new Circle({ @@ -1379,6 +1381,7 @@ var Drawing = (function (Control) { case this._addUID("drawing-tool-polygon"): if (context.dtOptions["polygons"].active) { context.interactionCurrent = new DrawInteraction({ + stopClick : true, features : context.layer.getSource().getFeaturesCollection(), style : new Style({ image : new Circle({ @@ -1415,6 +1418,7 @@ var Drawing = (function (Control) { // text : creation de points invisibles avec un label. if (context.dtOptions["text"].active) { context.interactionCurrent = new DrawInteraction({ + stopClick : true, features : context.layer.getSource().getFeaturesCollection(), style : new Style({ image : new Circle({