google-maps-api-2

How can I include the traffic layer of google maps?

不羁的心 提交于 2019-12-18 12:47:51
问题 I'm new to development within android using the Google Maps API. I've been able to set up a map and test out the basic functionality, but I'm having trouble implementing the logic shown in the documentation into my own code. I've researched and found through google's documentation you must have the map check if traffic data is available by using: public final boolean isTrafficEnabled() and then calling the method: public final boolean isTrafficEnabled() { return mMap.isTrafficEnabled(); }

Add numbering label to google map marker

孤人 提交于 2019-12-18 12:44:13
问题 May I know how to add numbering label to google map marker using google map api? Just add label, not trying to change the icon. Thank you. 回答1: If you don't want to use custom icons for each marker then I suggest looking into creating a label class with the OverlayView and then binding the position to the marker. Or you could look at using something like: http://github.com/nmccready/google-maps-utility-library-v3-infobox 回答2: I think a better solution is to use a infoWindow. Something like

How do I track the location of a user throughout the day in Google Maps?

三世轮回 提交于 2019-12-18 12:38:49
问题 How would you track the location of a user for the entire day, like the timeline in Google maps? I have two ideas For example, if I have 200 LatLng values per day, how do I pass all of these LatLng values to Google map as points? I got one google doc reference in that I can track up to 10 locations points only. Is there any Google API to track the user throughout the whole day and make a timeline for it? 回答1: If you have 200 LatLng point you always can just draw them as polyline: ... final

Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a

拈花ヽ惹草 提交于 2019-12-18 10:36:48
问题 Everything was working ok, then suddenly eclipse started breaking asking for a perspective switch and going to debug mode with the error 'Link of class "Lcom/google/android/gms/location/internal/ParcelableGeoFence;" failed. Googling the problem lead nowhere. Debugger points to PathClassLoader(BaseDexClassLoader).findClass(String) line: 61 Strangely when I remove map.setMyLocationEnabled(true); from my code it no longer crashes but still I can see this in logcat E/dalvikvm(5639): Could not

Comparing two LatLng objects in google map v2 android

与世无争的帅哥 提交于 2019-12-18 06:35:22
问题 I have an arraylist which consists of latLong object as shown below: ArrayList < LatLng > latLngList = new ArrayList< LatLng >(); Note: LatLng is an object which has latitude and longitude values in double format i.e., Latitude is in double format and Longitude is in double format The below are the values which are stored in the above latLngList object: Lat Long List:[lat/lng: (34.072516,-118.403609), lat/lng: (34.074227,-118.399248), lat/lng: (34.07304,-118.3995), lat/lng: (34.07304,-118

How can I make a Google Maps API v3 hexagon tiled map, preferably coordinate-based?

让人想犯罪 __ 提交于 2019-12-17 18:51:07
问题 http://econym.org.uk/gmap/example_eshapes.htm has a Google Maps API v2 example of how to tile hexagons, although the implementation scales painfully: it has a center hexagon, then six hexagons adjacent to it in the appropriate directions, then (in quasi-recursion) three hexagons adjacent to one of the hexagons adjacent to the original hexagon. And it has a nice border with transparent fill. How can I create a similar effect, but preferably with tiling so that I specify (without mounds of

Draw a path on maps following the finger motion path on the device screen

别等时光非礼了梦想. 提交于 2019-12-17 18:32:11
问题 1)I want to draw a motion path on google map as per the follow of my finger touch points on the area of map. 2)and get the selected area from the map which lies inside the path. Any one have an idea how to achieve it. For reference want to do some thing similar:- 回答1: I have implemented the same for one of my Application hope that will help you, I have done this with the help of poly line and polygon. activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

Google Map v2 Marker Animation

你离开我真会死。 提交于 2019-12-17 15:42:12
问题 Do anyone have idea how this animation's implementation is possible in google map api v2. Check out this here. I would like to know how this is done. Please let me know if anyone have any sample code regarding this. Thanks in advance. 回答1: I found a solution that worked for me: final LatLng target = NEW_LOCATION; final long duration = 400; final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = map.getProjection(); Point startPoint = proj

Show wind direction on Google Maps

邮差的信 提交于 2019-12-17 15:41:47
问题 I calculated the wind direction and now I want to show the wind direction pointing to 144 degrees (on compass). How can I show this arrow on Google Maps? 回答1: In order to show an arrow over a google map you can create a Rich Marker that embed an image using the google-maps-utility-library-v3, Next apply a rotation in degree to the image element with css3 tranformations. In example : // content element of a rich marker var richMarkerContent = document.createElement('div'); // arrow image var

Map API v2 Authorisation Failure

一曲冷凌霜 提交于 2019-12-17 12:42:11
问题 Alright, here is what I did using the example Got the debug key via keytool (made sure it is the the debug key is used by eclipse in Preferences -> Android -> Build) Generated the key by the command $ keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android Copy pasted the SHA1 sum in the Google API Console + my packagename: sum;com.my.package Enabled Google Map API v2 in the same project in Google API Console Copied it to the Manifest application