How about this...
- OSMDroid_CircleOverlay
Fields:
- RADIUS_UNITS_TYPE_METERS As RadiusUnitsType
- RADIUS_UNITS_TYPE_PIXELS As RadiusUnitsType
Methods:
- AddCircleOverlayItem (Center As GeoPoint, Radius As Float, RadiusUnitsType1 As RadiusUnitsType, StrokeWidth As Float, StrokeColor As Int) As CircleOverlayItem
Creates, adds and return a CircleOverlayItem object.
- AddCircleOverlayItem2 (Latitude As Double, Longitude As Double, Radius As Float, RadiusUnitsType1 As RadiusUnitsType, StrokeWidth As Float, StrokeColor As Int) As CircleOverlayItem
- ClearCircleOverlayItems
Clear the CircleOverlay of all CircleOverlayItems.
- GetBoundingBox As BoundingBox
Returns a BoundingBox that represents the area covered by the centers of all CircleOverlayItems.
- Initialize
- IsInitialized As Boolean
- RemoveCircleOverlayItem (CircleOverlayItem1 As CircleOverlayItem) As Boolean
Remove CircleOverlayItem1 from the CircleOverlay.
Return True on success otherwise False.
- OSMDroid_CircleOverlayItem
Fields:
- FILL As Style
Geometry and text drawn with this style will be filled, ignoring all stroke-related settings in the paint.
- FILL_AND_STROKE As Style
Geometry and text drawn with this style will be both filled and stroked at the same time, respecting the stroke-related fields on the paint.
- STROKE As Style
Geometry and text drawn with this style will be stroked, respecting the stroke-related fields on the paint.
This is the CircleOverlayItem default.
Properties:
- Center As GeoPoint
- Radius As Float
- RadiusUnitsType As RadiusUnitsType
- StrokeColor As Int
- StrokeStyle As Style
- StrokeWidth As Float
- Tag As Object
The CircleOverlay displays CircleOverlayItems - a CircleOverlayItem has a center, radius, stroke width, stroke color, stroke type and Tag property.
The CircleOverlay methods AddCircleOverlayItem and AddCircleOverlayItem2 create, add and return a CircleOverlayItem.
That reference to the CircleOverlayItem can be used to remove it from the overlay using the method RemoveCircleOverlayItem.
All CircleOverlayItem properties can be modified at runtime though you'll need to call the MapView Invalidate method to see any modifications applied.
You can set a CircleOverlayItem radius in units of pixels (fixed size circle) or meters (circle size depends on zoom level).
You can choose the stroke style (same as PathOverlay) of FILL, FILL_AND_STROKE or STROKE.
And the CircleOverlay now has a GetBoundingBox method.
Updated library files and demo b4a project can be downloaded from here:
http://b4a.martinpearman.co.uk/osmdroid/CircleOverlay-20140505.zip.
Martin.