Android map draw circle radio with GPS coordinates from SQLite Database
Actually I'm developing an application for research with Android by my own and I'd like to develop an application with these features:
The idea is simple:
We have some GPS coordinates stored in the SQLite Database. Using the GPS location manager I'd like to locate my actual location and draw a position pushpin in the map. Once the application locates the current position, I'd like to check the nearest GPS position coordinates from the SQLite database in a radio of, let's say, 10km (may vary).
I have develop some applications: ReadfromSQLiteDB, GetGPSition and the only thing I need is to draw the GPS points within the circle that I'm not pretty sure how to make it.
I'm kindly asking for some advice or help :) Thanks in advance
Here is an example or idea o开发者_运维百科f what I want to make.
You can do what you want using map overlays.
- For the user location use MyLocationOverlay
- To draw the objects near the user, retrieve the objects from the db (you can ask the MyLocationOverlay for users current position) and then use ItemizedOverlay
If you need more functionality than this classes provide, you can implement your own Overlay
by subclassing it.
精彩评论