google-maps-android-api-2

How to show both MarkerIcon and Title in google map as like Google Apps?

六眼飞鱼酱① 提交于 2019-11-28 03:18:35
问题 When I find nearest restaurants in Google's Maps Android Application the restaurant name is showing near to marker icon as default. (Refer Google Image). But in my application I need to do same when I search for nearest restaurants, I able to display only marker icons. (Refer My Application Image). Google Image: My Application Image: Partial Solution : Here I found partial solution for this we get this by drawing a text using canvas. I used below code refer by these links here and here But

Disable and enable view android

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 02:02:48
问题 My target is to draw free shapes above google map v2, so I created an app to draw free shapes by finger movement in a custom view and putted this view above the map fragment in the layout.xml and made the view background to be transparent. and now I can draw free shapes well but the problem now is that I can't control map or do zooming or dragging in it. Is there are any way to make me control both of them, for example a button to covert the control from map fragment to view of drawing and

How to create direction arrows for my polylines in android

烈酒焚心 提交于 2019-11-28 01:45:31
what i need to add for PolylineOptions polyline = new PolylineOptions(); polyline.addAll(geom); polyline.color(defaultStrokeColor).width(defaultWidth); mapObjects.add(polyline); this code to display the arrow head? I have seen other questions/answers about this that use markers and rotate them. But there is a simpler way to have directional arrows on GoogleMap Polylines. The GoogleMap API v2 provides a slick way to do this by adding an " endcap " icon to the PolylineOptions. It takes your input bitmap icon and rotates it in the direction of your Polyline. No markers necessary for the

Android Google Maps API Location

梦想与她 提交于 2019-11-28 01:42:53
I've googled around a bit, and still can't find a definite answer to this. What is the current "best" or "recommended" way of using Google Maps in Android? I want my application to use the blue dot that automatically keeps track of the user's location, much like the Maps app does when you click on the "my location" button. Some of this functionality seems to come built in just by using the map, however, I'm unsure how to extract the Location from this, as I've read .getMyLocation() is deprecated? What is the best way to do this? I am using this code: //get locationManager object from System

Google Map returning nullpointerexception Google Maps Android V2

喜夏-厌秋 提交于 2019-11-28 01:38:04
I have a google map in a fragment in my application. Funny thing is that the map loads, but the logcat displays a NullPointerException , and I only noticed it when tried to update the camera on the map so that it could automatically zoom in on the marker . Only then the map will crash. Otherwise, the map loads fine in the fragment but with no marker (even though I am adding one using my current gps location ). EDITED* I understand that its crashing because the googleMap is null, but I don't understand why it's returning null. The map renders and well I've done this before and it usually

android - draw resizable circle on google map

旧街凉风 提交于 2019-11-28 00:49:23
问题 I'm trying to draw a resizable circle on top of my google map, which the user will be able to expand or shrink using touch gestures (for example to shrink the circle the user will pinch the circle on the screen, I want it to work like zooming in/out option in the map, only that just the circle will get bigger/smaller on the map). Is this possible to implement? And if so how would I go about accomplishing that. I searched Google and Stackoverflow and as I understand, I need to add a custom

MapActivity query for nearest hospital/restaurant not working

此生再无相见时 提交于 2019-11-28 00:20:20
EDIT: Resolved! In addition to Daniel's answer (saved my life), here's what I did: 1. Replaced the 'MapActivity2' class to a server API key. 2. Let the other keys in the manifest and 'maps_activites.xml. be the android API key 3. Enable the following APIS on Google Developer APIS: Google Maps Android API Google Places API for Android Google Places API Web Service 4. BOOM! It worked. Here's the code to my github repository in any case: https://github.com/bholagabbar/AurumHealthApp I am trying to retrieve the nearest restaurants from my current location. I am using the code I found online here .

Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above

烈酒焚心 提交于 2019-11-28 00:19:31
问题 I'm trying to run Google Map's sample project on emulator. Now I have an error: Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above How can I resolve that problem? 回答1: I had the same issue running with an emulator. I fixed by editing my emulator in AVD Manager , at Emulator Options checking the box for Use Host GPU . 回答2: Google Maps API v2 has a bug. See here: http://code.google.com/p/gmaps-api-issues/issues/detail?id=5440 As linked by Tony in comments above there

how to change the color of a particular area on Google map api v2 in android

拥有回忆 提交于 2019-11-28 00:17:54
问题 I am working on an Android app that makes use of the Google Maps API v2 and would like to mark a specific area on the map with a certain color on a click event. For example, when I click on India, the area covering the country should be colored green. I'm already using GroundOverlay , but it requires an image to display something on the map, resulting in the colored area not being a good match. Since both the map and the image have their own shape, this does not cover the exact area. Can

Blank GoogleMap on a real Android 2.3 device with Google API (Lv. 17)

岁酱吖の 提交于 2019-11-28 00:13:57
Question Description, Please read this first I am trying to get my simple app which will display user's location running on devices from Android 2.3 to Android 4.0+ devices. The map does not show up on a real Android 2.3 device. The app currently can run and show maps as I desired on Android 4.0+ device without any problem. Because it can display maps without any problem on Android 4.0+, so I presume the problem should not be anything wrong with the settings or permissions of Google Maps V2. However when I try it on Android 2.3 devices, the map area will be a blank like the screen shot shown