google-maps-android-api-2

PolylineOptions cannot be null

核能气质少年 提交于 2019-12-14 01:25:24
问题 I am making a map application where I am showing route between two points (dynamically). In this I am retrieving latitude and longitude from the database (which can change with time). This is a college project, so have not worked on the security part. This is the java file for the navigation: public class NavigationActivity extends AppCompatActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, GoogleMap.OnMarkerDragListener,

Create a Marker without adding it to the map? [closed]

非 Y 不嫁゛ 提交于 2019-12-13 12:58:47
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . How to create instance of Marker class, but without adding it to the map. 回答1: You may use LazyMarker.java from Android Maps Extensions. It doesn't physically create marker until you call setVisible(true) on it.

Why has my NETWORK_PROVIDER suddenly stopped calling onLocationChanged?

这一生的挚爱 提交于 2019-12-13 10:24:16
问题 My NETWORK_PROVIDER in my GPS application has stopped working all of a sudden. It has nothing to do with my internet connection because every other application on my phone works with the internet. I tried it with GPS_PROVIDER and it works perfectly fine and on top of that, after calling onLocationChanged it IS able to retrieve locations from the internet, so this further reinstates that the internet WORKS. My phone: Samsung Galaxy S2 Android version 4.0.3 Things I have tried to no avail:

Google Maps Android API - trigger touch event on map

谁说胖子不能爱 提交于 2019-12-13 09:55:19
问题 I need a way to trigger/fire a map touch event programmatically. Is there any solution? Update 1: I have map and a kmlLayer on it. the kmlLayer has only a click event but in my case I need to fire this event when I click on another button. it's exactly what I want. According to this answer I add a fake and programmatically touch event but it not worked on a map view! Update 2: My question is totally different with Google Maps Android API v2 - detect touch on map. Because it is about how to

Can't create project with Google Map android API V2

谁都会走 提交于 2019-12-13 08:57:41
问题 I have read document in https://developers.google.com/maps/documentation/android/start I create project android in eclipse, folow document step by step but when I can't run project. sample error java.lang.NullPointerException error log 03-20 15:13:39.332: D/AndroidRuntime(28930): Shutting down VM 03-20 15:13:39.332: W/dalvikvm(28930): threadid=1: thread exiting with uncaught exception (group=0x2b542210) 03-20 15:13:39.352: E/AndroidRuntime(28930): FATAL EXCEPTION: main 03-20 15:13:39.352: E

Android - Saving location updates (using LocationServices API) from a Service

喜你入骨 提交于 2019-12-13 08:50:03
问题 I have set up an environment where the app receives location updates, which is handle on the onLocationChanged callback. // Setup the client. mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); } // Register the location update. LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this); // Interface callback. Called every 5 seconds. @Override

Android google maps API 2 got JSONException:org.json.JSONException: Index 0 out of range [0..0) at org.json.JSONArray.get(JSONArray.java:263)

余生颓废 提交于 2019-12-13 08:22:11
问题 I am drawing route between 18 locations to draw the google map v2.When i start fetching routes it draws route but some times it is not drawing route and it gives JSONException :org.json.JSONException: Index 0 out of range [0..0) at org.json.JSONArray.get(JSONArray.java:263) and also it gives "error_message" : "You have exceeded your daily request quota for this API." "routes" : [] "status" : "OVER_QUERY_LIMIT" public class JSONParser { static InputStream is = null; static JSONObject jObj =

How many free mapviews can I do with my Android app + Google Maps Android API?

无人久伴 提交于 2019-12-13 07:38:37
问题 With Google Maps API, you have a limited # of free mapviews (25000 per day) before you start to pay (0,5$ per day/1000 mapviews) or buy a premium license (1M mapviews per year). But my quesiton is: I want to attach a google map inside of my Android App, but I'm wondering about how many free mapviews can I do? Does it work like Google Maps API? Do not we have a limited number of mapviews? The reason why I'm asking this is because I want to geolocalize my inicial coordinates and then, "draw"

Whole screen turns into black for a short while when first switching between Fragment and MapFragment

醉酒当歌 提交于 2019-12-13 07:35:55
问题 I want to switch 2 fragments in the activity with FragmentTransaction and one is MapFragment. In the first switch, the whole screen turn into black for a very short moment. But in the last switch, the phenomenon gone. Here is the demo vedio. http://www.youtube.com/watch?v=FDf-LTZT9Wk And Here are some source code that I do the switching. xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/my_container"

Adding items to cluster manager & call to cluster() have no effect until AsyncTask finishes

僤鯓⒐⒋嵵緔 提交于 2019-12-13 07:25:27
问题 My situation: I use an AsyncTask to prepare data for a google map. Because this task takes some time, I'd like to display the objects as they are ready (and not all at once when finished). So I use publishProgress & onProgressUpdate to update the map. I use the Google Maps Android API utility library to add the markers to the map. I call ClusterManager.cluster() after data changes to force reloading of the markers. The problem: Nothing happens. Updating a ProgressBar from onProgressUpdate()