//@Override public bool draw(BoundingBox boundingBox, byte zoomLevel, Canvas canvas, MapCore.Model.MapPoint canvasPosition) { if (this.GeoPoint == null || this.Shape == null) { return(false); } double latitude = this.GeoPoint.Latitude; double longitude = this.GeoPoint.Longitude; double pixelX = (MercatorProjection.longitudeToPixelX(longitude, zoomLevel) - canvasPosition.X); double pixelY = (MercatorProjection.latitudeToPixelY(latitude, zoomLevel) - canvasPosition.Y); Rect drawableBounds = this.Shape.GetPosition(); double left = pixelX + drawableBounds.Left; double top = pixelY + drawableBounds.Top; double right = pixelX + drawableBounds.Right; double bottom = pixelY + drawableBounds.Bottom; if (!intersect(canvas, left, top, right, bottom)) { return(false); } var clone = this.Shape.Clone(); canvas.Children.Add(clone); Canvas.SetTop(clone, pixelX); Canvas.SetLeft(clone, pixelY); return(true); }
public Dependency(T value, MapCore.Model.MapPoint point) { this.value = value; this.point = point; }