Gmap and MySQL

Topics: Windows Forms
Jun 25, 2013 at 10:23 AM
Hello guys!

First of all, my gratitude for your wonderful work, it makes my life easier.

But, I have a problem:
  • I am writing an application, using your SDK. Basically, I read the latitude and longitude from a MySQL table and according to a parameter, from same table, I set a marker bitmap. Something like this:
Do While Reader.Read()
     If Int(Reader(2)) <> 0 Then
          MarkersLayer.Markers.Add(New GMarkerGoogle(New PointLatLng(Val(Reader(0)), Val(Reader(1))), New Bitmap("C:\Users\Ionut\Desktop\MapMarker\" &  Get_Marker(Int(Reader(3))) & ".png")))
          MarkersLayer.Markers.Add(New GMarkerGoogle(New PointLatLng(Val(Reader(0)), Val(Reader(1))), GMarkerGoogleType.gray_small))
     End If
Get_Marker() function works correctly, no execution errors, but all I can see on my map is the last marker and only that one.

Any idea what I am doing wrong? Or, any advice about how I can make this to work right?

Thank you!
Jun 25, 2013 at 11:14 AM
add layers before using them, meaning move last line to the top or somewhere where you configure the map
Jun 25, 2013 at 11:21 AM
Works perfectly! Thanks a lot!