This project is read-only.

Dynamically Add Polylines in Code

Jul 21, 2009 at 4:30 PM

I know you can dynamically add Markers using 

GoogleMap1.Markers.Add(new Artem.Web.UI.Controls.GoogleMarker(LATITUDE, LONGITUDE));


My question is I want to dynamically add Polylines connecting each of my markers, how would I accomplish this?



Jul 22, 2009 at 10:02 AM


 GooglePolyline gpl = new GooglePolyline();
        gpl.Color = System.Drawing.Color.Red;


 GooglePolyline gpl = new GooglePolyline();

  gpl.Color = System.Drawing.Color.Red;

// you can make a loop here (from database for example)


 GoogleLocation gl = new GoogleLocation(YOURLONG, YOURLAT);






hope it help


Aug 29, 2009 at 1:18 AM
Edited Aug 30, 2009 at 6:13 AM

I can't get the code from the previous post to work.  It will work if I put it in the markup code (.aspx) but not in the code behind.

I have the same problem with the GoogleCirclePolygon.

I have no problems doing markers in the code behind.

I have the vml xmlns linked in the html header.

Using 2.0 with VS 2005 and the built in debug web server.

Any help would be appreciated.


I got it to work based on the code in GoogleCirclePolygon.aspx.cs in the source codeI don't know what I was doing that was wrong before (?).

Thanks anyway.