I'm trying to assign a datasource to a gmap control in 2.0 so that i can get pushpins in the map for all the locations in the sql db. I've enclosed my code below as well as a link to the site that provides the control and their sample. Can anyone tell me why it won't show the pins? What am I doing wrong?
Thanks.
My Code (sqllocations is a datasource):
GMap1.DataSource = sqllocations;
GMap1.DataBind();
Their site: http://en.googlemaps.subgurim.net/ejemplos/ejemplo_991000_DataSource.aspx
Their example (part of their explanation is not english, sorry):
List<DataSourceField> fields = new List<DataSourceField>();
fields.Add(new DataSourceField(45, 2, "hola"));
fields.Add(new DataSourceField(46, 3));
// Lo comentamos porque al utilizar la clase DataSourceField,
// pero si fuera un dataset o cualquier otra cosa,
// le deberĂamos dar los nombres correspondientes
// GMap1.DataLatField = "lat";
// GMap1.DataLngField = "lng";
// GMap1.DataGInfoWindowTextField = "gInfoWindowText";
GMap1.DataSource = fields;
GMap1.DataBind();