google-maps-android-api-2

GIF type animation for marker in google map api ANDROID

主宰稳场 提交于 2019-12-18 04:08:08
问题 I want to achieve a marker animation such as GIF animation. I got two images which should be blinking simultaneously. I found nothing which can acheive this in android. I am trying to do is , creating a handler which run every 1 second , and I am trying to set icon for marker. But it doesnt work. Please guide me in right direction. my code as of now is as follows. Handler handler = new Handler(); Boolean marker_color_bool = true; //adding marker and sending the marker instance to marker

GIF type animation for marker in google map api ANDROID

筅森魡賤 提交于 2019-12-18 04:08:01
问题 I want to achieve a marker animation such as GIF animation. I got two images which should be blinking simultaneously. I found nothing which can acheive this in android. I am trying to do is , creating a handler which run every 1 second , and I am trying to set icon for marker. But it doesnt work. Please guide me in right direction. my code as of now is as follows. Handler handler = new Handler(); Boolean marker_color_bool = true; //adding marker and sending the marker instance to marker

Picasso image loading issue in GoogleMap.InfoWindowAdapter

末鹿安然 提交于 2019-12-18 02:48:44
问题 I am using Google Maps Api and want to show an image inside InfoWindow when clicking of a Marker. I implemented it but there is a problem about Picasso. When I click a marker, infoWindow is shown up and imageView shows placeholder image. If I click same marker one more time, Picasso loads the image succesfully. I have to click twice, it is so weird. Screenshots for better understanding: First click on the marker: When I click again: There is my codes below: InfoWindowAdapter (Picasso loading

Google map API v2 is not working

二次信任 提交于 2019-12-18 01:14:09
问题 I am trying to run sample code mention here : Google Maps Android API V2 Sample code but i am getting error NoClassDefFound. Below is my logcat. Can any one help me to solve it. Any help is highly appricated Thanks 12-04 18:04:18.854: E/AndroidRuntime(1801): java.lang.ExceptionInInitializerError 12-04 18:04:18.854: E/AndroidRuntime(1801): at java.lang.Class.newInstanceImpl(Native Method) 12-04 18:04:18.854: E/AndroidRuntime(1801): at java.lang.Class.newInstance(Class.java:1319) 12-04 18:04:18

Android Maps v2 - animate camera to include most markers

喜夏-厌秋 提交于 2019-12-17 21:29:00
问题 I have a set of points coming from a webservice that need to be displayed on a map. I have a current solution working nicely for most cases, using the well-known LatLngBounds.Builder , CameraUpdateFactory.newLatLngBounds and map.animateCamera . I have some cases which give problems though: when the points are too far away, the map centers on max zoom level on the barycenter of those points. For example: I have 10 points in France and 2 points in Hawai. Maps centers more or less on the

Want to create google map navigation in my application - custom way

柔情痞子 提交于 2019-12-17 20:57:06
问题 I have created an application in which I am trying to show user's movement by animating marker position. Using Google map V2. Location updates using location client. Animating marker using new location. But comparing with Google map navigation, there is no continuity in rendering navigation. Can anyone suggest a better approach? Thanks! 回答1: For continuity, I think you need to fetch regular location updates from location client by giving location request like this. LocationRequest request =

Draw driving route between 2 GeoPoints on GoogleMap SupportMapFragment

£可爱£侵袭症+ 提交于 2019-12-17 19:27:32
问题 This is a tricky question, been banging my head for a day, please help. I use Google Maps Apis to get the shortest driving distance and its routes, points, etc between 2 GeoPoints that I provide, see code below private JSONObject GetDistance(String src, String dest) throws Exception { StringBuilder urlString = new StringBuilder(); urlString.append("http://maps.googleapis.com/maps/api/directions/json?"); urlString.append("origin=");// from urlString.append(src); urlString.append("&destination=

How to retrieve current device location & show it on map fragment in a fragment

空扰寡人 提交于 2019-12-17 19:25:57
问题 I'm developing a android app with google maps. Currently I'm able to view the map inside my app, but I don't know how to view the current location on the app. Here is my code: public class MapsFragment extends Fragment{ MapView m; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // inflat and return the layout View v = inflater.inflate(R.layout.map_near_me, container, false); m = (MapView) v.findViewById(R.id.map); m.onCreate

Google Maps Android API v2 creating a new LocationSource

风流意气都作罢 提交于 2019-12-17 18:44:57
问题 A LocationSource is defined in Google Maps Android API v2. It is used for googlemap as the location provider. By default, the location source is provided by the gps module on the phone. But now I want to use a another Location source , the location data will be sent to android device periodically. I have no idea how to implement this interface. Are there any example out there? Can anyone help me with it? The document did not say anything about it. 回答1: Here is a simple implementation of

Can I have a single Google Maps API key for all my apps without registering their package names?

北战南征 提交于 2019-12-17 18:34:51
问题 I have written an android library project that includes custom MapFragments, based on Google Maps for Android v2 API. In the Google APIs console, I have registered the library's package name with my debug/signed certificates. I need to create various apps that use this library as common code base and I was wondering if there is a way to still use the MapFragments of the library, without having to add each app's package name in the Google APIs console. I need this because I want to automate