I have a question about google map script embedded in c#. I want to draw path between points. I try some samples, but i couldn't. Now i can just show points.
My code following;
private void BuildScript(DataTable tbl)
{
foreach (DataRow r in tbl.Rows)
{
Latitude = r["Latitude"].ToString();
Longitude = r["Longitude"].ToString();
Locations += Environment.NewLine + " map.addOverlay(new GMarker(new GLatLng(" + Latitude + "," + Longitude + "))); ";
i++;
}
js.Text = @"<script type='text/javascript'>
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById('map_canvas'));
map.setCenter(new GLatLng("+Latitude+","+Longitude+ @"), 10);
" + Locations + @"
map.openInfoWindow(map.getCenter(), document.createTextNode("+Latitude+@"));
map.setUIToDefault();
}
}
</script> ";
}
How can i do it?
Thanks