public void RenderPointOfInterestCircle(RenderContext renderContext, float radius, IPaint fill, IPaint stroke, int level, PointOfInterest poi) { Point poiPosition = MercatorProjection.GetPixelRelativeToTile(poi.Position, renderContext.rendererJob.tile); renderContext.AddToCurrentDrawingLayer(level, new ShapePaintContainer(new CircleContainer(poiPosition, radius), stroke)); renderContext.AddToCurrentDrawingLayer(level, new ShapePaintContainer(new CircleContainer(poiPosition, radius), fill)); }
/// <summary> /// Computes the coordinates of this bounding box relative to a tile. </summary> /// <param name="tile"> the tile to compute the relative position for. </param> /// <returns> rectangle giving the relative position. </returns> public virtual Rectangle GetPositionRelativeToTile(Tile tile) { Point upperLeft = MercatorProjection.GetPixelRelativeToTile(new LatLong(this.MaxLatitude, MinLongitude), tile); Point lowerRight = MercatorProjection.GetPixelRelativeToTile(new LatLong(this.MinLatitude, MaxLongitude), tile); return(new Rectangle(upperLeft.X, upperLeft.Y, lowerRight.X, lowerRight.Y)); }