google-maps-android-api-2

Google Maps current location marker and accuracy radius overlay

牧云@^-^@ 提交于 2019-11-30 14:17:06
How can I display a blinking ellipsis and a circle demonstrating user's current location and the accuracy (blue overlay) on Google Maps Android API v2? To be more specifically, how can I have an animated drawable like the one Google uses? And how can I display a circle as a blue overlay (25% alpha or something like)? Thanks. Actually, the solution is simpler than I thought. When using Google Maps Android API v2, the GoogleMap object has a method called setMyLocation. If you set it to true, the my-location layout of the Maps API will be activated and it will display this blue ellipsis or an

Make clickable polygons on Google Maps (for Android)

寵の児 提交于 2019-11-30 14:00:22
I have continuous LatLngs of various areas in a city. Is there any way I can create clickable polygons with it. Once way to go about would be to Generate polygons with the available LatLngs.( I want to visually show the polygons on the map with color encoding) Set up setOnMapClickListener . Do a point inside polygon test. I understand that this is very naive. What are the alternative approaches? bittterbotter Here's how I did it. Polygon polygon = getMap().addPolygon(new PolygonOptions() .add(new LatLng(12.780712, 77.770956), new LatLng(12.912006, 77.229738), new LatLng(12.412006, 77.629738),

NoSuchMethodError com.google.android.gms.internal.g.f

戏子无情 提交于 2019-11-30 13:45:38
I have a difficult problem to solve. I've published my app on Play and everything is okay, but the problem is that there are 2 devices that crashes the app with the following error: java.lang.NoSuchMethodError: java.io.IOException.<init> at com.google.android.gms.internal.g.f(Unknown Source) at com.google.android.gms.internal.g.b(Unknown Source) at com.google.android.gms.internal.e.a(Unknown Source) at com.google.android.gms.internal.e.a(Unknown Source) at com.google.android.gms.internal.bq.ac(Unknown Source) at com.google.android.gms.internal.cg$1.run(Unknown Source) at com.google.android.gms

how to draw text in default marker of google map v2

廉价感情. 提交于 2019-11-30 13:41:21
I want to draw text in default marker of Google map v2. I have done this by taking my own image from drawable but how can i change it in default marker. my code is marker.icon(BitmapDescriptorFactory .fromBitmap(drawTextToBitmap(getApplicationContext(), R.drawable.images,"5"))); and drawTextToBitmap methods is. public static Bitmap drawTextToBitmap(Context gContext,int gResId,String gText) { Resources resources = gContext.getResources(); float scale = resources.getDisplayMetrics().density; Bitmap bitmap = BitmapFactory.decodeResource(resources, gResId); android.graphics.Bitmap.Config

Refreshing makers (ClusterItems) in Google Maps v2 for Android

我怕爱的太早我们不能终老 提交于 2019-11-30 12:38:18
I'm using Google Maps Android API Utility Library and I'm downloading certain images from internet that I want to use as markers. The way I'm doing it is like in the following snippet: class MarkerItemClusterRenderer extends DefaultClusterRenderer<MarkerItem> { ... @Override protected void onBeforeClusterItemRendered(MarkerItem item, final MarkerOptions markerOptions) { super.onBeforeClusterItemRendered(item, markerOptions); mImageLoader.get(item.getImageUrl(), new ImageListener() { @Override public void onErrorResponse(VolleyError error) { Log.i("XXX", error.toString()); } @Override public

Is it possible to add arrows heads on poly line using Android maps V2 [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 11:10:07
问题 This question already has answers here : How to create direction arrows for my polylines in android (3 answers) Closed last year . How to draw poly line with arrow head(It indicates the direction) using Android Maps V2 API. In Android Maps Documentation this option is not available.Is it possible to add arrows on polyline? 回答1: Here's a working example I've developed using the same concept as what Doug suggested, by taking a JavaScript example (http://econym.org.uk/gmap/example_arrows.htm)

How to customize PlaceAutocomplete widget dialog design to list places

倖福魔咒の 提交于 2019-11-30 10:26:43
问题 I need to show list of places in dropdown using google placeAutocomplete widgets. Here I'm getting dialog to show places according to my query but I need to give custom design for that search result dialog as like in Uber, Ola apps. Here I want design like below image. If anyone done this before please give me your suggestions,thanks in advance. 回答1: You need to customize your adapter. I had implemented this functionality in my project. You can follow this. activity_search.xml <?xml version=

Polylines appearing on map where they shouldn't

此生再无相见时 提交于 2019-11-30 10:24:20
I have a array of about 7000 locations, each one was recorded using the location manager on android, when loading these locations I filter out any that are further then 1km from the previous or have an accuracy higher then 50 using this: if (c.moveToFirst()) do { lat = c.getString(0); lng = c.getString(1); ac = c.getString(2); alt = c.getString(3); if (l1 != null) { l2 = new Location("MAP"); l2.setLatitude(Double.parseDouble(lat)); l2.setLongitude(Double.parseDouble(lng)); l2.setAltitude(Double.parseDouble(alt)); l2.setAccuracy(Float.parseFloat(ac)); if (l1.distanceTo(l2) < 1000 && l2

getSupportFragmentManager returns null

我怕爱的太早我们不能终老 提交于 2019-11-30 09:45:40
问题 I'd like to show Google maps in my android app: public class DisplayMapActivity extends ActionBarActivity { private LbsTracker2 lbsTracker2; private GoogleMap googleMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); try { this.initilizeMap(); } catch (Exception e) { e.printStackTrace(); } } @Override protected void onResume() { super.onResume(); initilizeMap(); } private void initilizeMap() { if

Android Google maps APIv2 InfoWindow and Markers

旧街凉风 提交于 2019-11-30 09:34:31
问题 I'm using Google maps APIv2 for android. I've implemented MapFragment, put markers where I need, added custom InfoWindow for markers. The issue is - I have AsyncImages in my InfoWindow and have ProgressBar there. The thing is - ProgressBar doesn't spin, and Image doesn't set after I got it from cache. AsyncImages does work well. I've tested it into another class. I've replace my AsyncImages view with just single ProgressBar - the same. It doesn't spin. Any suggestions? UPD. Spinner doen't