android-maps-v2

Remove the last polyline line from Google Map Android?

我与影子孤独终老i 提交于 2019-12-25 09:15:28
问题 I created a class that select latitudes and longitude from sqlite then mark on map then draw polyLine . Problem : Every time I select my records 100 to 100, when I saw first 100 then I clear map then I get second 100 but when I start animate it show me last polyline how I can clear last polyline ? My code : public class PathActivity_F extends AppCompatActivity implements OnMapReadyCallback { private GoogleMap mMap; Query_DB QDB; private List<Marker> markers = new ArrayList<>(); private final

Android - Cursor onMapReady (Markers)

本小妞迷上赌 提交于 2019-12-25 06:27:57
问题 I'm trying to "inflate" my content from SQLite into Markers but the solution I took of here it's not working, and it's not throwing any information on Log. I'm a bit new on this Marker stuff and SQLite My code inside the Fragment : SQLiteHelper dbHelper = new SQLiteHelper(getActivity()); pds = new ParksDataSource(dbHelper.db); parks = pds.getAllParks(); List<Marker> markersList = new ArrayList<Marker>(); int i = 0; Cursor cursor = db.rawQuery("SELECT * FROM " + SQLiteHelper.TABLE_PARKS, null)

MapFragment blocked or stunned when application is killed or state saved

三世轮回 提交于 2019-12-25 04:57:25
问题 I'm getting problems using MapFragment + ListFragment in an Activity, when I use show() and hide() method, everything works ok, but when I have my application in background and I return, I get the GoogleMap stunned or blocked, and I don't know what to do to solve that. The only solution I got to work fine, is using replace transactions, but I don't like this way, because in every transaction we should initiate all map place balloons, and it doesn't keep your last camera location, so... I don

Android map Update location to server when there is difference of x meters between current location and last location

柔情痞子 提交于 2019-12-25 02:26:56
问题 I wanted to update the server with latlong of current location when there is difference of x meters between current location and previous location. I have a app where i wanted to track vehicle movement so the driver who is using that app inside the vehicle will automatically update its current location when there is difference of x meters between current position of cab and previously stored location. So other users will be able to locate this driver where exactly is.(So in this case should i

getMap() returning null

非 Y 不嫁゛ 提交于 2019-12-25 01:55:44
问题 My getMap() method is returning null. Why is this method returning null? I looked on the Android Developers documentation to make sure I'm using this method correctly. Here a the line of code that I'm using to get the map: mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.myMapView)).getMap(); Here is my Java code: private ProjectionProxy proxy = new ProjectionProxy(); private GoogleMap mMap; @Override protected void onCreate(Bundle load) { super.onCreate(load); setContentView

How to call event depening upon latitide and longitude?

守給你的承諾、 提交于 2019-12-24 19:07:04
问题 i am developing a location base application. which determines the latitude and longitude. now i want to compare it with same values and if matched i want to call event. i try it in many ways but unable to do it. kindly give an idea and code plz. work that i did till now Main activity package com.example.gpstracking; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class AndroidGPSTrackingActivity

Search Android Map Marker Titles and Snippets

百般思念 提交于 2019-12-24 07:13:17
问题 I have a map with several markers and I would like to be able to search them by marker title or snippet. I am new to Android so I'm not entirely sure on how to go about it. Any help pointing me in the right direction would be great. Here is my code: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.GoogleMap

What's a typical way to identify markers and get the Object associated with it?

流过昼夜 提交于 2019-12-24 02:22:14
问题 I'm using a map in one of my applications. I'd like to know what's a common/efficient way to get the associated Object of a marker when it is tapped. What I've been planning to day is something like this: First, I create an ArrayList of my Objects and a HashMap of those Objects using the markers returned by mMap.addMarker(...); as the index. ArrayList<MyObject> items = new ArrayList<MyObject>(); HashMap<Marker, MyObject> markersAndObjects = new HashMap<Marker, MyObject>(); Now, I override

Android Get the markers that are not clustered

不想你离开。 提交于 2019-12-23 17:53:26
问题 I'm developing an android application and I'm using Google Maps Android API Utility Library. To be more specific I'm using the cluster part of that library. Now to my question: I'm interested in the markers that are shown on the map but that are currently not clustered. I've tried different stuff but can't wrap my head around it. The thing that kind of works is to save all the rendered marker items in a arraylist then compare the marker positions to LatLng bounds of the map on screen, if the

Is not a concrete class AndroidManifest

淺唱寂寞╮ 提交于 2019-12-23 07:27:40
问题 I am getting an error with not a concrete class when I add the Activity in the AndroidManifest. Please help me figure out the problem by removing abstract class for the activity but it doesn't resolve. public abstract class MapsActivity extends FragmentActivity implements OnMapReadyCallback { private GoogleMap mMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map_fragment); setUpMap(); } @Override protected void