google-maps-android-api-2

Directions API on Android

怎甘沉沦 提交于 2019-11-29 12:06:28
问题 While I was going through this blog, I got confused about using the Directions API on android. Is it possible to integrate the Directions API on the Map? To make it more clear, I am working on an application that would take in inputs from the users for things like source and destinations ... taking these inputs I would like to display an appropriate map having both the walking and driving directions depicted. Is just a JSON parser (or XML) enough to support this wish of mine, along with a

Google Maps API V2 - always get authentication error

大憨熊 提交于 2019-11-29 11:30:12
I found lots of questions regarding this - and I am almost ashamed to ask it myself. But no matter how hard I try, I simple do not get the Maps API running at all! Not with the demo project, com.example.mapdemo, not with my own project. I definitely have my debug.keystore SHA1 fingerprint registered, now for both my app and com.example - I also tried the browser API key where everybody says that would work, too. BUT NO. I always get: 06-16 11:21:29.860: E/Google Maps Android API(2382): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to

Google Maps Android API v2 - APIs related to my location deprecated. Why?

自古美人都是妖i 提交于 2019-11-29 11:30:07
Since the Google I/O 2013 we can read in several places of the documentation of Google Maps Android API v2 that This method / interface is deprecated. use com.google.android.gms.location.LocationClient instead. LocationClient provides improved location finding and power usage and is used by the "My Location" blue dot. See the MyLocationDemoActivity in the sample applications folder for example example code, or the Location Developer Guide . While it is great the new API appeared, I can't think of any good reason to put @Deprecated on these methods. They are indeed a very convenient way of

Add GIF image to marker of Google Map Api v2

旧街凉风 提交于 2019-11-29 10:53:37
When I add GIF Image to marker of google map V2 the image is shown but it stops its movement. Why? And how can I solve this issue and make the image do its movement? Hope anyone can help me. Thanks in advance. Marker Icon in google maps android api v2 is a static image and you cannot change the icon once you have created the marker. So if you are trying to include any animation using GIF images, it will not be supported and only a single image from the GIF will be shown as the icon. An option to achieve changing marker image is to programatically remove() the marker after a certain time and

Getting Android Google Map v2 working in release version by generating SHA1 fingerprint for API key

耗尽温柔 提交于 2019-11-29 10:44:26
I spent a long time tonight trying to figure out how to get my Google Map that worked in the debug version of my Android application to work in the release version. There were a few different problems that came up. Some fragments of Stack Overflow posts helped, but I thought it would be useful to list more detail for the whole process, including the problems I had, which were: 1) How/where do you specify something different for your release version? 2) How do you run the keytool executable needed to get the release version fingerprint? 3) Why was I getting the "keystore file exists but is

Clustering map markers on zoom out and unclustering on zoom in

不问归期 提交于 2019-11-29 10:27:08
问题 I am using the Google Map Android clustering Utitlity With Google Maps v2 play services. I am not getting the behavior I expected. As you can see in the two images below, when zoomed in I can see a cluster of 20 and a single marker up an to the left, but when i zoom out til they are on top of each other i am not seeing them cluster.. the 20 cluster still says 20 and not 21? Is that expected behavior? Is there a way can make the cluster show 21 instead of 20+ 回答1: This is default behavior

Google Map Direction Api using Retrofit

蓝咒 提交于 2019-11-29 10:26:17
问题 I want to draw the route between two Location. I used the retrofit library to call the API. I didn't get any response. I need the polyline in an ArrayList. How i do that? Need help to create the GsonAdapter also... Thank you.. 回答1: In the activity ` String base_url = "http://maps.googleapis.com/"; Gson gson = new GsonBuilder() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .create(); RestAdapter restAdapter = new RestAdapter.Builder() .setEndpoint(base_url) .setLogLevel

Google Maps v2 In fragment cashes when clicked twice

元气小坏坏 提交于 2019-11-29 10:04:00
I'm trying to set up Google maps in my app inside a fragment with a marker. It works when I click on it the first time but when I click on another fragment then back to the Google maps one it crashes. Not sure what the issue is? Any help would be awesome, only beginner. Heres code: Xml <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google.android.gms.maps.SupportMapFragment"/> Java google maps fragment EDIT WORKING CODE

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

耗尽温柔 提交于 2019-11-29 10:02:10
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 canvas drawing cutting of my text. Refer attached image TextDrawn Image Marker myLocMarker = map

MapFragment in Action Bar Tabs

故事扮演 提交于 2019-11-29 09:50:06
问题 I am trying to build an app that will implement Action Bar tabs. One of the tabs should contain a MapFragment. How can I implement an action bar with tabs, under one of which is a map Fragment? Can you help me with how to proceed with this? Here is what I have so far : main class package com.nfc.demo; import android.app.ActionBar; import android.app.ActionBar.Tab; import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; import android.os.Bundle; public