Building custom overlay specifically circle with radius(colored) in Android MapBox GL. It allows to change radius dynamically using seekbar.
I'm trying to build some custom markers and I used SimpleCircleView but Im having problem trying to display it in MapBox GL android, and it created lots of bugs.
- The map touch event is unresponsive once my
CircleOverlay
is displayed in map - The marker doesnt stay in its coordinates once i zoom-in , zoom-out.
- Updating markers doesnt work, So I have to remove then add again the marker.
- The color does not match the color that I set in marker.
I'll limit my posting on code, because this repo is mine and to keep the problem understandable.
In building custom overlay I have to make these classes:
- CircleMarkerView.java - The Custom Marker View
- [CircleMarkerViewOptions.java] (https://github.com/spurdow/SimpleCircleView/blob/master/app/src/main/java/com/spurdow/circleviewtest/CircleMarkerViewOptions.java) - This is to be used with CircleMarkerView
- SimpleCircleView.java - This is my custom view for dynamic circle changing its radius etc.
- MainActivityMapBox - This is where to put it all
This is an example of the code in the repo.
Does anybody have any idea how to do this simply? Or Is there another way of building an overlay dynamically? Or Is it possible to create a circle bitmap dynamically and convert it to icon when seekbar's progress is changing?