Android Map animateCamera does not reload map - android

In my Android app I have to move the camera and draw a custom marker in the LocationCallback() everytime I get a location update when driving in a car. However It works fine. I just noticed that when I'm, using
gMap.moveCamera(CameraUpdateFactory.newLatLng(LatLng(location.latitude, location.longitude)))
the map loads the needed parts when driving to a new location. But I dont like that moveCamera 'jumps' from a location to a new location. Using
gMap.animateCamera(CameraUpdateFactory.newLatLng(LatLng(location.latitude, location.longitude)))
is just as smooth as I expect it to be, but in this case the map does not reload new contents so I'm driving in the middle of the fog of war!
Is there a possibility to get a smooth camera position update including a reloaded map?

Related

position marker keeps going on false route before rerouting HERE maps premium sdk

is it possible on here android sdk to force positioning marker to stop before calculating new route?
we tested this case which other navigations their marker stops then continue on new route but here positioning marker indepentently moving along a wrong path even the car turned to another street.
You are probably looking for this API. NavigationManager#setMapUpdateMode. It takes an enum MapUpdateMode. If you use POSITION or POSITION_ANIMATION it should do what you are suggesting.
This feature is called map matached navigation with extrapolation. The extrapolation is what is causing the marker to keep moving.

How to detect panning on GoogleMap

I am trying to plot some markers on my Application using Google Maps.Initially the application displays some markers at around current location.Then after panning on map new markers have to be displayed on new camera position.This should be displayed after the user have stopped panning.Currently the markers are stored in remote database.After user have stopped panning markers have to be loaded by calling webservice.
The problem is that how can i detect the panning on map and when the panning have stopped.Google maps OnCameraChangeListener() cannot be implemented because it detects all changes on map including zoom change thru code also.I have to detect the pann change thru touching on map only because there is lot of zoom and camera changes thru code also.
I followed the github link
Actually I am not getting the correct idea how to implement the MapStateListener in my map View activity.
and many other links in Stack Overflow but cannot get any solution while implementing.

Android map marker smooth movement

I'm doing an android application which involves google map to show smooth location movement.for example,if the user is in driving.,the marker which indicates current position should do smooth move according to the user move.How could i do that.I don't have any idea in this.Help is much appreciated.thanks.

How to set OnTap/ Touch listener to googleMap Marker when using compass, the map rotate auto

i build navigate application using google map, the map is rotate automaticly by the compass.
the problem is when i set markers.
i am using OnTap(int) in my extended ItemizedOverlay, for popup Toast msg when i click on marker, it works fine on standard use of google map.
But, because i use map that rotate by the compass the touch listener dont rotate with the map.
only the markers are rotate ok with the map but the touch listeners stays in other place on scereen.
SomeOne know how to referesh markers louch location or how to fix it?
thank You!!!!
Use mapView.postInvalidate() to refresh the markers whenever your map is rotated by the compass. I'm not entirely sure if this will work because I've never faced this sort of a situation. Do let me know what happens.

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