Fix XYZ coordinates in snap interaction

This commit is contained in:
tsauerwein
2015-04-24 09:26:31 +02:00
parent 70b0406c50
commit 77f16c7fd6
2 changed files with 61 additions and 1 deletions

View File

@@ -583,7 +583,7 @@ ol.interaction.Snap.SegmentDataType;
ol.interaction.Snap.handleEvent_ = function(evt) {
var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
if (result.snapped) {
evt.coordinate = result.vertex;
evt.coordinate = result.vertex.slice(0, 2);
evt.pixel = result.vertexPixel;
}
return ol.interaction.Pointer.handleEvent.call(this, evt);