Reputation: 564
I am building an app that has a map feature and have search all over the internet trying to find a solution to my problem.
The problem is, I don't know which method of implementation is best for me.
I want to do two things and I'm sure new programmers are thinking of this too:
1) I want to make a map view that has the user's location on it and has pin points of locations that I have supplied in a list.
2) I want to get the closest store (based on a latitude/longitude list) to the person.
Is this possible? I don't need the entire implementation coded for me. I just need a starting point.
Thanks,
Upvotes: 0
Views: 81
Reputation: 93559
Definitely possible. You need 3 things:
1)A MapView. You need to sign up for a Google Maps id, they have some tutorials for implementing one where you do. The Maps API has functionality for showing your location and for putting pins on the map.
2)You'll need to get your own location for your calculation. This is a simple use of the LocationManager and Location classes.
3)You need to get a list of the stores with their latitude and longitude. At startup you parse the list, add them to the map overlay, and you can find the distance between you and them using the Location class's distance functions.
Upvotes: 2