All Questions
Tagged with google-maps-android-api-2 java
531
questions
0
votes
2
answers
53
views
Cannot zoom in to current location in Android Studio
public class Game_Activity extends FragmentActivity implements OnMapReadyCallback {
private Location currentLocation;
private FusedLocationProviderClient fusedClient;
private static final ...
0
votes
0
answers
55
views
Track my location only when I'm load this app / fragment at the second time
I'm facing an unusual issue in my Android application where the initial GPS location doesn't update properly when the app is loaded for the first time. Here's the relevant code snippet:
public class ...
0
votes
0
answers
36
views
How can I make only some markers clickable in Google map for Android?
I am developing an Android app with a google map, which contain various markers. Some of these markers should be clickable, and it works nicely, using the setOnMarkerClickListener method on the ...
3
votes
1
answer
100
views
Polylines can't be remove on the map
I am working on an Android app that uses the Google Maps Android API, and I'm having trouble clearing polylines from the map. I have implemented the addition of polylines within a dialog, and I want ...
1
vote
0
answers
53
views
Passed value mismatch error for SphericalUtil.computeDistanceBetween()
I am trying to calculate distance between two points using SphericalUtil.computeDistanceBetween. The value which I provided is from com.google.android.gms.maps.model.LatLng but the required type is ...
0
votes
0
answers
187
views
API Key not Found for google maps sdk for android
I've been struggling w this project for weeks now. Specifically getting the API Keys to work, I'm not sure what I'm doing wrong. My code is as follows:
package com.example.hopefullyfinalgeoguessr;
...
1
vote
0
answers
198
views
How do I get the current location on the Android Studio map activity?
I am creating an app, and it has a bottom navigation bar. One of the pages I am going to use for a map with the current location. The following shows my code so far for that page. Can this code be ...
0
votes
0
answers
118
views
How can I fix 'Invalid key' error & retrieve JSON data of specific places from Maps API?
So I am trying to use the Places API for an android app. I've used the correct URL to query for the JSON results of places however when I run the app I receive this error in my logcat: data: { "...
0
votes
1
answer
148
views
How get the altitude of a place where the phone is located ( not the altitude of the phone)
I am implementing an android app in java to determine if an object is in flight (in the example ,it's a phone hang on a drone ) . To proceed,i retrieve the altitude of the phone , then i retrieve the ...
0
votes
0
answers
66
views
Can we allow our app user to add geofencing radius in android app?
I want to create an application that tracks childs location through firebase and implement geofence on that location. How do i initiate GeofenceClient with that location from firebase instead of my ...
0
votes
1
answer
330
views
How to check if a LatLng point lies inside a polygon on the geojson layer on google maps android
Currently, I am working on a location-based project. In this project I've added a GeoJsonLayer as below:
As can be seen in the image, the red marker is inside a box. Is there any way to check if the ...
-1
votes
1
answer
88
views
my app is crashing when there is no internet and i want my markers or my map to refresh each second
i made a googlemap app where my markers are displyed.
the problem is when there no internet, the app is crashing. The code under onResume does not solve the problem.
also i want to refresh the map or ...
0
votes
0
answers
28
views
Can't assigned Latlng from Bundle
I run the debugger and get these details
If the bundle has the Latlng, then why I can't assign it to the global variable?
This is InputTempatActivity class where I get the Latlng:
private Agenda ...
1
vote
0
answers
47
views
show a map with the current location of the user and the stations downloaded from the server
good morning everyone i have a problem with a fragment class. Specifically, I want to show the user's current location and the location of different train stations downloaded from the server.
My code ...
0
votes
0
answers
124
views
Retrofit API calls are not synchronous in Android
I am getting location of the user in the background service and putting it in local database and I am checking if any connection is available I've to pass this data to the server using API. For API I ...