I am a beginner in Android Developer. I want to develop a Map Application using Google Map. Now, I want to add marker on the map via Touch or Tap on the Map. I do not know how to apply touch event to drop the marker on the map. Please tell me and, if it is possible, please give me some links or examples. Thank you and sorry for my English.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Try these Tutorial 1 and Tutorial 2for understanding of Google maps
and refer this link to Stack Overflow Question so as to do it on onTouch
This code is Successful run I am working on that code this code is for Dynamic Draw
I think this code help you more for Static or dynamic both places you can use this code
The technique which i used is:
hope it helps!!!
Try using new Google Map API v2.
It's easy to use and you can add a marker on tap like this:
or in Kotlin:
Note that you might want to remember all your added points in a list (
allPoints
), so you can re-draw or remove them later. An even better approach to remember the points would be to remember aMarker
object for each of them - you can get theMarker
object as a result from theaddMarker
function, it has aremove()
function that easily removes the marker from the map.