android-mapview

Android tap on map and get coordinates

﹥>﹥吖頭↗ 提交于 2019-12-01 06:45:44
Hi guys I am trying to make an app that once the user taps on a map it gets the coordinates of that specific point. Among others i have also read that: Get coordinates on tapping map in android It seems like the most relevant post but what I want to do is to be able to tap anywhere on the map not on an marker/overlay item. In fact I want to create a marker in that specific point that the user tapped and get the coordinates of it. Is that possible? Thanks Mike CommonsWare Yes. In fact, the answer I gave in that other question is what you need. Should be trivial with a little bit of math. You

java.util.ConcurrentModificationException On MapView

随声附和 提交于 2019-12-01 06:40:36
问题 fellas I am facing very strange issue from many days. I am trying to update overlay frequently. So sometime I am getting "java.util.ConcurrentModificationException" when I touch on map or sometime getting when map trying to update overlay But I am not finding perfect line which on this error is coming. 02-17 14:56:01.621: W/dalvikvm(3653): threadid=1: thread exiting with uncaught exception (group=0x40015560) 02-17 14:56:01.631: E/AndroidRuntime(3653): FATAL EXCEPTION: main 02-17 14:56:01.631:

Android MapView can't remove marker

别来无恙 提交于 2019-12-01 06:23:50
问题 I'm using locationManager and ItemizedOverlay to draw My Location marker, the problem is when onLocationChanged is triggered I'm getting new marker drawed and not the last one moved to the new location, here is my onLocationChanged code : public void onLocationChanged(Location location) { myOverlay object1 = new myOverlay(getResources().getDrawable(R.drawable.arrow),MyMap); if(location!=null){ MyMap.invalidate(); GeoPoint MyPos = new GeoPoint(microdegrees(location.getLatitude()),microdegrees

Android MapView - custom Zoom buttons

我与影子孤独终老i 提交于 2019-12-01 06:08:15
do you know, if there is a way how to make custom zoom buttons in Android's mapView? Or there are only prepreared zoom controls? Thanks Hmyzak You can set the default zoom controls to false ( mapView.setBuiltInZoomControls(false) ), add some buttons that are drawn on top of the map and have each button have a listener for when they are pressed. The MapView allows you to set the zoom level. One of the buttons could do a mapView.getController().zoomOut() , the other could do a mapView.getController().zoomIn() . If for some reason you need to find the zoom level, you can do a mapView

Android tap on map and get coordinates

醉酒当歌 提交于 2019-12-01 05:54:38
问题 Hi guys I am trying to make an app that once the user taps on a map it gets the coordinates of that specific point. Among others i have also read that: Get coordinates on tapping map in android It seems like the most relevant post but what I want to do is to be able to tap anywhere on the map not on an marker/overlay item. In fact I want to create a marker in that specific point that the user tapped and get the coordinates of it. Is that possible? Thanks Mike 回答1: Yes. In fact, the answer I

how get the progress status of loading mapview in android?

不羁的心 提交于 2019-12-01 04:33:59
问题 while the map is in loading state i want to put a progressbar at the center of mapview. how to get the progress?? and how to do?? give me some example.. thanks. 回答1: I don't think there is any reasonable way of doing it. Note that Google isn't doing this either in their map applications. It is pretty clear just looking at the page to see if tiles are still loading, so I don't think there is actually any need to put in a progress indicator. The MapView has a method canCoverCenter() which can

Android MapView - custom Zoom buttons

淺唱寂寞╮ 提交于 2019-12-01 03:07:48
问题 do you know, if there is a way how to make custom zoom buttons in Android's mapView? Or there are only prepreared zoom controls? Thanks Hmyzak 回答1: You can set the default zoom controls to false ( mapView.setBuiltInZoomControls(false) ), add some buttons that are drawn on top of the map and have each button have a listener for when they are pressed. The MapView allows you to set the zoom level. One of the buttons could do a mapView.getController().zoomOut() , the other could do a mapView

Distance between two location in Android map

隐身守侯 提交于 2019-12-01 02:10:15
How to calculate distance between 2 location in android map & output must display in textview or any ? For those people like me, who are learning now/late. Have made use of the code written by @NaserShaikh below. Here you go a working code to get driving distance on google map when u have lat,long of two points!! distance is in miles ! There are better way to parse the JSON response pls look for it. Havent tested it for extremes when there is a ocean btw and other stuffs. Hope it helps. package havefun; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader

Android getbearing only returns 0.0. Trying to use to rotate current location icon

£可爱£侵袭症+ 提交于 2019-12-01 01:45:02
This is in part an extension to a previous question: Android programming, mapview locationoverlay: how to change the default blue location dot, with another image I have been working to get the devices location to display on the map (easy with enablemylocation) but I need to replace the default icon (easy enough, sorted that) and then rotate it to correspond to the current device bearing - acquired from GPS, as it needs to be direction of movement, not direction the phone is facing. I am using 'getbearing()' in the same way as I've been successfully using 'getlatitude()' and 'getaltitude()',

Change roads color in “google maps android api v2”

僤鯓⒐⒋嵵緔 提交于 2019-12-01 01:41:43
I would like to know if there is an equivalent to javascript api v3: Styled Maps Because i need to change the roads color, and would like to mask road labels. Is it possible directly from the android v2 api? I tried to use javascript v3 api to fix the precedent problem but my app needs tilt like this too and it looks like no tilt for javascript v3 api :( . Finaly, do someone have a solution to: add tilt to javascript v3 api for ROADMAP or/and change the roads color in android v2 api Thank you :D Unfortunately, you are not able to do either of these at this point. The JavaScript Maps API does