Organizational Research By

Surprising Reserch Topic

cant mark while showing the current location in mapview using -'android,google-maps,gsp'

cant mark while showing the current location in mapview  using -'android,google-maps,gsp'

Hear is my project

In my project I am showing my current location,showing the current lat-long.But I'm not able
to mark my current position in android.

Thnx in advance.

public void onLocationChanged(Location location) {
    // TODO Auto-generated method stub
    Log.d(TAG, "onLocationChanged with location " + location.toString());
    // Displays lat, long, altitude and bearing
    String text = String.format("Lat:\t %f\nLong:\t %f\nAlt:\t %f\nBearing:\t %f", location.getLatitude(), location.getLongitude(), location.getAltitude(), location.getBearing());

    try {
        // This gets a list of addresses
        List<Address> addresses = geocoder.getFromLocation(location.getLatitude(),
                location.getLongitude(), 10);
        for (Address address : addresses) {
            this.locationText.append("\n" + "kaushik");

        // Convert latitude and longitude into int that the GeoPoint constructor can understand
        int latitude = (int)(location.getLatitude() * 1000000);
        int longitude = (int)(location.getLongitude() * 1000000);

        point = new GeoPoint(latitude,longitude);

        MapOverlay mapOverLay=new MapOverlay();
        List<Overlay> listOfOverlays=map.getOverlays();


    } catch (IOException e) {
        Log.e("LocateMe", "Could not get Geocoder data", e);


asked Sep 7, 2015 by rajesh
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.