In my android app I need to show the user’s current location in Google map. I can change the map in onLocationChange() method. But the thing is I want to change the pin also. How can I move the pin when user move on ?
Thanks in advance !
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you need to pass the lat/lng to the MapActivity class and then get set into the GeoPoint object. Also you have add Overlay(once when first time you display the pin on map) into your map and in your that class which was implement by the overlay you have to draw the pin point and pass the the GeoPoint object in that
here I have implement like this way in my application tempPoint is the GeoPoint which was contain the lat/lng value and when the location change you have to pass that value to the MapActivity and invalidate the map so that’s way you can move your pin