I am getting an icon shown in the figure on the google Maps. Now i have the confusion how to show the current location on the maps with marker whenever a user clicks on the current Location icon the google maps. After placing this code i got the icon on the google maps
Map.setMyLocationEnabled(true);
On the top-right google map is showing the current location icon, Now my confusion is how to handle this event to show my current location on the google maps.
use setOnMyLocationButtonClickListener()
and override
@Override
public boolean onMyLocationButtonClick(){
return false;
}
returning false does the default behavior
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.