/// <summary> Deletes way from element source. </summary> private void DeleteElement(long id, Rectangle2d rectangle) { EnsureElementSource(rectangle.BottomLeft); var nullPoint = _tileController.CurrentTile.RelativeNullPoint; var boundingBox = new BoundingBox( GeoProjection.ToGeoCoordinate(nullPoint, rectangle.BottomLeft), GeoProjection.ToGeoCoordinate(nullPoint, rectangle.TopRight)); _elementSourceEditor.Delete <Way>(id, boundingBox); }
public void CanDeleteElement() { // ARRANGE var way = CreateWay(); _editor.Add(way); // ACT _editor.Delete <Way>(way.Id, new BoundingBox(way.Coordinates[0], way.Coordinates[1])); // ASSERT var result = GetWayById(way.Id); Assert.AreEqual(1, result.Count); Assert.AreEqual(1, result[0].Tags.Count(t => t.Key == ActionStreetMap.Maps.Strings.DeletedElementTagKey)); }