Delete all but one marker in Android Google Maps V2 - android

So I have some places of interests shown to user via markers with respect to their current location (which is also shown as a blue marker on the map).
What I want, is to sustain the location marker on the map, remove all the other markers, and refresh it after certain conditions are met. I was able to do all that except the sustaining user location marker + overlay circle.
I know that there's map.clear(); function but wouldn't it also clear the current location marker? How to achieve what I want to?
Thanks.

Related

Drawing the Current_Location Marker(circle) before the cluster markers on Google Map

I am using Clustering on google map.
I have set current location circle on google map using below lines :
mMapView.setMyLocationEnabled(true);
The issue is that, current location circle is overlapping the cluster.
Is there any way to put the current location marker to back of cluster count ?
Thanks.

How do i make a marker show only on road, rather than showing it on houses and buildings?

I have been able to show my current location on the map. I have been able to use the location manager and fused location api to display my current location. Here i am unable to maintain the positioning of the marker in the map, i.e; When ever i move on road just to check the movement of the marker, the marker also moves but some times it goes over houses and buildings. How do i make the marker stay put on road. If you check the Uber app, the car that comes to pick you up always stays on the road it never goes on top of the houses and buildings.
Kindly advice me on how to make the marker move only on the road.
Thanks in advance.
Sidharth

How to remove/disable accuracy circle from current location in Google Maps for Android

I want remove that blue accuracy circle from my current location in Android Google Maps v2.
I found way with removing circle and marker, and puting new marker, but it seems to me uncool.
I search way to disable only that circle.
You can't remove it from stock Android Google Map app (that's obvious for you I hope).
You can however do what you want in your own app, i.e.:
don't show my-location layer
and if you want to show my-location just add your custom marker in getLastLocation position

Is it possible in Android Google maps to change default location from South Africa to Australia?

I want to confirm one thing in Google maps that is
why Google maps always showing South Africa as default location...
Can't we change Australia as Default one.
If GPRS enabled I can trace the current location if not i want to show Sidney in Australia . Is it possible ???
Google Maps will show the user's current location if you ask for it.
You can also manually set the "default" location by moving the map to give a particular location.
CameraUpdate point = CameraUpdateFactory.newLatLng(new LatLng(53, 2));
// moves camera to coordinates
map.moveCamera(point);
// animates camera to coordinates
map.animateCamera(point);
Best to use moveCamera rather than animateCamera for the default position.
The reason you are seeing South Africa is because the map defaults to (0,0) when initialised without any extra data, so it doesn't have somewhere to point to other than it's default. (0,0) happens to be near Africa.
Use moveCamera before the map is shown to the user and it will be showing wherever you have selected by default.

Updating location on map while user moving in Android

I am working on a application where I want to show user location when user is moving. I get user location using custom overlay but when user moves marker jumps from one location to another location which I don't want. Marker must move smoothly. Does anyone done this before??
Please give some example code..
Thank You
Edited:--
After using MyLocationOverlay it doesn't solve my problem but when I implemented LocationListener to my activity it solved my problem as now it is more smooth than previous version. I am checking location for 1 micro second & for 0.00001 meters.
Now When marker moves outside the visible area of map it doesn't show the marker so whenever marker moves outside the current visible area of the map activity itself should center of the map to current location (i.e. to the marker location)..
Thank You
If you want your marker moves smoothly then you have to listen the location at very small time .
Means that you have to set the minimum time and minimum distance for location updates to 0.
so when you get the new location you have to update that location on the map so it will work smoothly.

Categories

Resources