0
votes

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 of what I want to make.enter image description here

1
Are you asking how to find the points within the circle, how to draw the circle, how to add the points to and overlay or ... ?Idistic
1- Find my Location 2- Draw a position arrow like in the previous image using current GPS data 3- Draw a circle with different radio size 4- Get the nearest GPS positions from my current position (GPS position in SQLite) 5- Draw these positions in the map That's what I'm trying to do :)Iker
So you want to know how to do each of these things in detail?Idistic
Actually I was trying to find some advice, most of all these features I know how to make it but I havesome problems with the circle and putting the GPS coordenates from my actual location in a radio of 10km. Should I grab the GPS coordenates using a SQL code or Grab all the GPS position to an arrayadapter an once then use a function to check which one are near my position depending on my radio range?Iker
I think this is too broad a series of questions and you would have better luck posing individual questions, like: Given a large set of coordinates what would be the best method of selecting those that are within a 10KM radius of a center coordinate. etc.Idistic

1 Answers

0
votes

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.