简体   繁体   中英

Google Maps API v2 for Android - Let user add marker or overlay of specific things they spotted

Thanks for reading this. I've just implemented the Google Maps API in my Android APP and it works perfectly. I've added markers of specific points of interest in the onCreate which also works fine. The next thing I need to do is give the user of the app the ability to add a marker or overlay if they see something on the route an this should be visible to all the other users using the app. The App is used to help people spot animals in a nature reserve by checking the app to see where animals was spotted by other users of the app. If possible i need these markers to disappear after let's say 2 hours as the animal will probably not be there anymore. My "setMyLocation is set to true and the app shows my current possition. Please help point me in the right direction as I'm not sure where to start or what to use for this. Your help is appreciated.

Thanks Janno

What I would do:

Save the positions in a database. Add a colum timestamp to the table. In this timestamp you save the current time + 2 hours.

To get the right positions, Create a query which selects the positions where the timestamp is bigger than the current time.

It might be a nice idea to save what animal it is.

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM