最好的方式来增加地图上的标签以谷歌地图Android的 [英] Best Way to Add Map Pins to Google Map Android

查看:160
本文介绍了最好的方式来增加地图上的标签以谷歌地图Android的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力让地图上的标签在我的应用程序现在可以正常工作了约4天。我已经成功地增加了针脚,但我需要当用户点击地图上,并提供了一​​个新的位置,我得到一个错误的引脚被刷新。请记住,我需要这样的事情发生在后台,以便它不会影响地图的互动。

I have been working on getting map pins to work correctly in my app for about 4 days now. I have been successful at adding the pins but I need the pins to be refreshed when the user clicks on the map and provides a new location, I get an error. Keep in mind that I need this to happen in the background so that it does not affect the map interaction.

我的问题是,当用户点击地图的地图上的标签已经被更新的列表,我得到一个 ConcurrentModificationException的错误。

My problem is that when the user clicks on the map the list of map pins is already being updated and I get an ConcurrentModificationException error.

基本上我有一个JSONArray有位置,约25.我需要每个位置是在地图上,并在新的位置被触摸插针更新和旧针将被清除。

Basically I have a JSONArray which has locations, about 25. I need each location to be on the map and when the new location is touched the pins are updated and the old pins are cleared.

在如何使这一更友好,更容易的任何建议。我似乎无法摆脱 ConcurrentModificationException的的错误。

Any suggestions on how to make this more friendly and easier. I cannot seem to get rid of the ConcurrentModificationException error.

感谢你在前进。

推荐答案

下面是缺少插件......

Here is the "the missing widget"...

  • 在气球不带图标:<一href="https://github.com/jgilfelt/android-mapviewballoons#readme">https://github.com/jgilfelt/android-mapviewballoons#readme
  • 在气球图标(扩展杰夫Gilfelt的项目):<一href="https://github.com/galex/android-mapviewballoons">https://github.com/galex/android-mapviewballoons
  • Balloons without icons: https://github.com/jgilfelt/android-mapviewballoons#readme
  • Balloons with icons (extends Jeff Gilfelt's project): https://github.com/galex/android-mapviewballoons

这篇关于最好的方式来增加地图上的标签以谷歌地图Android的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆