I am working with the Here Map SDK and I need to show a blue icon with circle animation for current location like in image.
Can anyone tell me how to do it.
Right now I have code which sets the icon only which is blue dot. I don't know how to add circle animation to it.
Note that the mMap
reference is a Map object from the Here Android SDK.
mMap.getPositionIndicator().setVisible(true);
mMap.getPositionIndicator().setZIndex(0);
mMap.setZoomLevel(15);
mMap.getPositionIndicator().setAccuracyIndicatorVisible(true);
mMap.getPositionIndicator().setMarker(createImage(R.drawable.ic_location_dot));
Click the blue-and-white target symbol near the bottom-right corner of the map to re-center the map and display your current location, which will be marked with a blue dot.
The blue dot shows you where you are on the map. When Google Maps isn't sure about your location, you'll see a light blue circle around the blue dot. You might be anywhere within the light blue circle. The smaller the circle, the more certain the app is about your location.
If the blue dot isn't visible or is grey, Maps can't find your current location and shows you the last location you visited. If there's something between you and any mobile towers, such as a multi-storey car park or tall buildings, then your blue dot might not be accurate.
Try this one:
mMap.setMyLocationEnabled(true);
It enables or disables the my-location layer. While enabled and the location is available, the my-location layer continuously draws an indication of a user's current location and bearing, and displays UI controls that allow a user to interact with their location (for example, to enable or disable camera tracking of their location and bearing).
Much better if you place it under:
@Override
public void onMapReady(GoogleMap googleMap) {
}
You can control the HERE Maps current location icon through com.here.android.mpa.mapping.PositionIndicator
class.
Its instance is kept in com.here.android.mpa.mapping.MapView
that might be wrapped in a fragment like com.here.android.mpa.mapping.SupportMapFragment
.
Examples:
mapFragment.getPositionIndicator().setVisible(true)
mapView.getPositionIndicator().setAccuracyIndicatorVisible(true)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With