Usuario anónimo  |  Ingresar  |  Regístrate
Mensaje dentro Help

Blank map using GMarker

#1 - 30/05/2017 19:05:03 Reporta abuso | Link permanente
Fecha de registro: 21/03/2009
2 posts en todos los foros
Blank map using GMarker

Responder Citar
I am new to creating Google Maps on a websites.

I am getting a blank map.

I have tried to get this to work, but I am not sure what to look for.

I have the procedure that is in my program that is adding markers to the map.

I know the reverse geocoding is working because when I debug, I am seeing the longitute and latitude values correctly.

I have added my coding below.

Any help would be greatly appreciated.

Protected Sub cmdMapIt_Click(sender As Object, e As EventArgs) Handles cmdMapIt.Click        Dim strAddress As String        Dim iCntr As Integer        If ddlStart.SelectedItem.Value = "0" Then            txtMsg.Text = "You must select a starting address"            txtMsg.Visible = True            Exit Sub        Else            txtMsg.Text = ""            txtMsg.Visible = False        End If        'Initialize Google Map        GMap1.enableDragging = False        GMap1.Language = "es"        GMap1.BackColor = Drawing.Color.White        SetStartPosition()        'Add Starting Point to map as a BLUE marker        strAddress = txtOtherStart.Text                AddMarker(strAddress, True)        iCntr = gvMapLeads.Rows.Count        For i As Integer = 0 To iCntr - 1            strAddress = gvMapLeads.Rows(i).Cells(2).Text & " " & gvMapLeads.Rows(i).Cells(4).Text & " " & gvMapLeads.Rows(i).Cells(5).Text & " " & gvMapLeads.Rows(i).Cells(6).Text            AddMarker(strAddress, False)        Next i        GMap1.Visible = True    End Sub

Protected Sub AddMarker(ByVal strAddress As String, bStartLoc As Boolean) Dim GoogleKey As String Dim GeoCode As Subgurim.Controles.GeoCode GoogleKey = ConfigurationManager.AppSettings.Get("") GeoCode = GMap1.getGeoCodeRequest(strAddress, GoogleKey) Dim gLatLng As New Subgurim.Controles.GLatLng(, GeoCode.Placemark.coordinates.lng) If bStartLoc = True Then GMap1.setCenter(gLatLng, 16, Subgurim.Controles.GMapType.GTypes.Normal) End If Dim oMarker As New Subgurim.Controles.GMarker(gLatLng) GMap1.Add(oMarker) End Sub

<%@ Register assembly="GMaps" namespace="Subgurim.Controles" tagprefix="cc1" %> <cc1:GMap ID="GMap1" runat="server" Version="3" Visible="True" Width="500px" Height="500px" />

Volver arriba

Powered by Subgurim.NET