This project is read-only.

Add Marker

Feb 11, 2008 at 9:20 PM
Could someone tell me how to put an address, rather than coordinates in Markers.Add(New... ?
Something like :
GoogleMap1.Markers.Add(New GoogleMarker("fleet street 1 London Great Britain", "This is fleet street 1."));
I cannot find the proper spelling ... and that example is not on the geocoding sample.
Thank you.
Feb 12, 2008 at 7:04 AM
For now GoogleMarker has no constructor with Address param.
I will add it and it will be available on the next release/upload.
However you can do it like this:

// .NET 2.0
GoogleMarker marker = new GoogleMarker();
marker.Address = "fleet street 1 London Great Britain";
marker.Text = "This is fleet street 1.";

// .NET 3.5
GoogleMap1.Markers.Add(new GoogleMarker {
Address = "fleet street 1 London Great Britain", Text = "This is fleet street 1."

Hope this helps.
Feb 12, 2008 at 10:42 AM
Thank you Velio. the first one works, but the C# to VB translater refuses the second.
Remarkable work you have done.