You can easily add map-markers, circles, polylines and polygones from codebehind

With googlemapcontrol.dll in your Visual studio toolbox you can easily draw map-markers, circles, polylines and polygones on the map and store your geometries in a database. Then you can show your geometries on the webmap when you need too by reading from your database. Make your own maping application in minutes using the samplecode provided.

Code example how to add markers from a SQL database from code behind, adjust as needed for you project 🙂

Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings(”daypilot”).ConnectionString)

Try
con.Open()
Dim sql As String = ”SELECT lat, lng , descript, quarantined FROM apiary ” ‘where owner = ‘” & nameref & ”‘”
Dim cmd As New SqlCommand(sql, con)
Dim myreader As SqlDataReader = cmd.ExecuteReader()
Dim landarea As New List(Of LatLng)()
While myreader.Read()
Dim isConfirmed As Boolean = myreader.GetBoolean(myreader.GetOrdinal(”quarantined”))

‘ If Not isConfirmed Then
‘If chkfill(myreader(”descript”)) Then
GoogleMap1.Markers.Add(New marker() With {
.Icon = ”http://maps.google.com/mapfiles/ms/icons/green-dot.png”,
.Animation = 2,
.Position = New LatLng(Val(myreader(”lat”)), Val(myreader(”lng”))),
.Info = ”Google.com”,
.Title = (myreader(”descript”)),
.Clickable = True
})
‘Else
‘GoogleMap1.Markers.Add(New marker() With {

‘.Icon = ”http://maps.google.com/mapfiles/ms/icons/blue-dot.png”,
‘.Animation = 2,
‘.Position = New LatLng(Val(myreader(”lat”)), Val(myreader(”lng”))),
‘.Info = (myreader(”descript”)),
‘.Title = (myreader(”descript”)),
‘.Clickable = True
‘ })
‘End If

‘ Else
‘GoogleMap1.Markers.Add(New marker() With {
‘.Icon = ”http://maps.google.com/mapfiles/ms/icons/red-dot.png”,
‘.Animation = 1,
‘.Position = New LatLng(Val(myreader(”lat”)), Val(myreader(”lng”))),
‘.Info = (myreader(”descript”)),
‘.Title = (myreader(”descript”)),
‘.Clickable = True
‘ })

‘ End If
End While
Catch ex As SqlException
Finally
con.Close()
End Try