i need to make a pointer over the MapView,how to do that?

Here is my location with long and lattitudes its working but i need to make pointer over there, is it possible.and also need to know can i write anything to my location on the map, plz any body help me

package com.emigostec;

import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;

public class GmapviewActivity extends MapActivity {
    /** Called when the activity is first created. */
    double lat=17.44764,lon=78.50882;
    GeoPoint gp;
    MapController mc;
    MapView mv;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mv=(MapView)findViewById(R.id.mapView);
        gp=new GeoPoint((int)(lat*1000000),(int)(lon*1000000));
        mc=mv.getController();
        mc.setCenter(gp);
        mc.setZoom(25);
        mv.setSatellite(true);
    }

    @Override
    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }
}

Answers


It's not exactly solution for you, but if you get source code from this http://www.hrupin.com/2011/10/how-to-implement-lazy-loading-for-markers-on-google-maps-in-android and this http://www.hrupin.com/2011/11/how-to-centering-google-map-on-balloon-center-in-android you can create a perfect solution.

Hope, it help you!


An overlay can be used to display anything on top of the map. You can write your own overlay to do that or simply use the com.google.android.maps.MyLocationOverlay to draw your current location marker.

See e.g. http://joshclemm.com/blog/?p=148 for a simple example.


Need Your Help

Replace a dropdown list in the last row of a table with text

jquery html table select drop-down-menu

I have an html table and in one column i have dropdown select. i would like a selector to get a handle to the dropdown in the last row of the table and change it to just regular text (using the va...

Which .NET assembly contains the definition for FormRegionMessageClass and FormRegionName?

c# .net winforms outlook vsto

I am trying to create a form region for Microsoft Outlook 2013 using Visual Studio Tools for Office. The assembly will not load because the following error is thrown:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.