android-maps-v2

Android Java google maps api v2:: how check with markers are within a circle on google maps android api v2

老子叫甜甜 提交于 2020-03-06 09:43:23
问题 How to check if markers are present within radius of circle and how to enable only those marker which are present under the area of circle? I used circle option to create circle on map on click of marker. I just want only those markers visible which are inside the circle. $$mMap.setOnMarkerClickListener(new OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { CircleOptions circle = new CircleOptions(); circle.center(latLng).fillColor(Color.LTGRAY).radius(1000);

Polylines are not showing between 2 Locations but Time and Distance is showing

徘徊边缘 提交于 2020-02-02 11:39:26
问题 Note: Sorry for my bad English because English is not my native language I have used Google Translate for this. I am working on an Android map app in which a user can find their friends' current location. For storing the current location I am using Firebase real time database. With previous help of Lalit Singh it is showing time and distance now but still not updating the Polylines between 2 different places. My updates code is below. mapsActivity.java (where i am getting friend location from

Android Make Disappear or remove the blue dot on the map v2

徘徊边缘 提交于 2020-01-23 05:27:30
问题 I'm trying to replace the blue dot on the map of my app. My intention is that instead of the usual blue dot, show an icon shaped plane. I achieve this and it works perfectly as follows: //... GoogleMap.OnMyLocationChangeListener myLocationChangeListener = new GoogleMap.OnMyLocationChangeListener() { @Override public void onMyLocationChange(Location location) { LatLng loc = new LatLng(location.getLatitude(), location.getLongitude()); try{ myPositionMarker.remove(); } catch (Exception e){ //..

Android maps V2 newLatLngBounds with bearing

白昼怎懂夜的黑 提交于 2020-01-22 13:19:26
问题 I'm using the new Android maps V2 with this layout: <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment" map:cameraBearing="270"/> I'm trying to use the method newLatLngBounds (LatLngBounds bounds, int padding) for zooming and seeing all my markers in the map, however the camera

Placing SupportMapFragment on DialogFragment

我只是一个虾纸丫 提交于 2020-01-21 18:06:50
问题 I'm trying to add SupportMapFragment on DialogFragment, but it return error inflating class fragment . I cannot figure it out why its returned error inflating class fragment . I think the method I use is correct. I need to extends from DialogFragment because i want show map in dialog. I have followed this answer, and this answer too, and no one can solve my problem. Somebody could help me? Thanks. Here is my DialogFragment : import android.support.v4.app.DialogFragment; import android.os

Android Google Maps V2 giving me IllegalStateException

若如初见. 提交于 2020-01-17 08:54:45
问题 I did all of the Steps that were shown on Google and i also looked up other solution but in the i end up with this. 03-07 05:04:48.318: E/AndroidRuntime(21463): FATAL EXCEPTION: main 03-07 05:04:48.318: E/AndroidRuntime(21463): Process: com.graft, PID: 21463 03-07 05:04:48.318: E/AndroidRuntime(21463): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.graft/com.graft.MainActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class fragment 03

Unfortunately Google Maps API Demos has stopped - Google Maps Android API v2

╄→гoц情女王★ 提交于 2020-01-16 14:09:51
问题 I have a problem with Google Maps Android API v2. Every time I try to open the app on device or even on emulator this message always display Unfortunately Google Maps API Demos has stopped I have made a video that Explain every steps that I did www.youtube.com/watch?v=WUmlu3CNOSo Actually I have tried many tutorials on internet, also I tried to do the coding by myself according to Google's instructions and this is the error that display on Eclipse www.ahmadssb.com/ttv2541/com.example.mapdemo

How to correctly animate a map created in Android Studio to follow the marker

纵饮孤独 提交于 2020-01-15 08:45:14
问题 I'm trying to update my map so that the map automatically moves to centre the marker. I want it such that if I move around, after 5 seconds, the map will animate itself to move such that the marker is central again. Here is the code: public class TrackDifferentLocation extends AppCompatActivity implements OnMapReadyCallback { private GoogleMap mMap; LatLng mLatlng; String json_string; public static TextView data; LatLng latLng = null; @Override protected void onCreate (Bundle

issue with removing polyline google map v2 android

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-14 07:16:08
问题 I am adding a polyline option simply as in google developer's website. PolylineOptions rectOptions = new PolylineOptions() .add(new LatLng(37.35, -122.0)) .add(new LatLng(37.45, -122.0)) // North of the previous point, but at the same longitude .add(new LatLng(37.45, -122.2)) // Same latitude, and 30km to the west .add(new LatLng(37.35, -122.2)) // Same longitude, and 16km to the south .add(new LatLng(37.35, -122.0)); // Closes the polyline. // Get back the mutable Polyline Polyline polyline

GooglePlayServicesUtil.getErrorDialog does nothing

旧街凉风 提交于 2020-01-14 05:29:13
问题 I am trying to handle use cases where the user doesn't have Play set up correctly. It seems extremely straight forward, but I can't get the dialog to do anything. I have the following code in onCreate for a FragmentActivity that uses Maps v2 . I have ensured that execution does go inside the if statements. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_map); this.helper = (DatabaseHelper) OpenHelperManager