title: Text Labels to Google Map Markers
body: <p>Currently working on a map tracking GPS coords around the UK, however I'm finding it hard to how each point uniquely, I would normally do this by adding a form of label but it seems Google Map API V3 only allows a max of 1 char, is there anything else I can try? I've tried the various scripts but nothing seems to work with my current setup.</p>
  
  <p>So any chance of some pointers? Just want a simple label of the section is pulled from the SQL, eg the title. </p>
  
  <p>The page is designed in ASP.NET (Visual Studio 2015) using VB.</p>
  
  <p>Code below:</p>
  
  <pre><code>    &lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="VB.aspx.vb" Inherits="VB" %&gt;
  &lt;META HTTP-EQUIV="Refresh" CONTENT="60;" /&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  
  
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head id="Head1" runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  
      &lt;style type="text/css"&gt;
  .boldStyle
  {
    font-size: 10pt;
    font-weight: bold;
  }
  
  
  .normalStyle
  {
    font-size: 10pt;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  
  &lt;form id="form1" runat="server"&gt;
  &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  var markers = [
  &lt;asp:Repeater ID="rptMarkers" runat="server"&gt;
  &lt;ItemTemplate&gt;
           {
              "title": '&lt;%# Eval("Loco") %&gt;',
              "lat": '&lt;%# Eval("TLatitude") %&gt;',
              "lng": '&lt;%# Eval("TLongitude") %&gt;',
              "description": '&lt;%# "&lt;b&gt;" &amp; "Last Update Time: " &amp; "&lt;/b&gt;" &amp; Mid(Eval("LLocation"), 12, 8) &amp; "&lt;br&gt;" &amp; "&lt;b&gt;" &amp; "Current Location: " &amp; "&lt;/b&gt;" &amp; Eval("TLocation") &amp; "&lt;br&gt;" &amp; "&lt;b&gt;" &amp; "Loco: " &amp; "&lt;/b&gt;" &amp; Eval("Loco") &amp; "&lt;br&gt;" &amp; "&lt;b&gt;" &amp; "Headcode: " &amp; "&lt;/b&gt;" &amp; Eval("Position") &amp; "&lt;br&gt;" &amp; "&lt;b&gt;" &amp; " Origin: " &amp; "&lt;/b&gt;" &amp; Eval("Origin") &amp; "&lt;br&gt;" &amp; "&lt;b&gt;" &amp; "Destination: " &amp; "&lt;/b&gt;" &amp; Eval("destination") &amp; "&lt;b&gt;" &amp; "&lt;br&gt;" &amp; "Status: " &amp; "&lt;/b&gt;" &amp; Eval("report_delay")%&gt;'
  
           }
  &lt;/ItemTemplate&gt;
  &lt;SeparatorTemplate&gt;
      ,
  &lt;/SeparatorTemplate&gt;
  &lt;/asp:Repeater&gt;
  ];
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      window.onload = function () {
          var mapOptions = {
              center: {lat:53.46, lng: -1.46},
              zoom: 7,
              mapTypeId: google.maps.MapTypeId.ROADMAP
          };
          var infoWindow = new google.maps.InfoWindow();
          var map = new google.maps.Map(document.getElementById("dvMap"), mapOptions);
          for (i = 0; i &lt; markers.length; i++) {
              var data = markers[i]
              var myLatlng = new google.maps.LatLng(data.lat, data.lng);
              var marker = new google.maps.Marker({
                  position: myLatlng,
                  map: map,
                  label: data.title
  
              });
              (function (marker, data) {
                  google.maps.event.addListener(marker, "click", function (e) {
                      infoWindow.setContent(data.description);
                      infoWindow.open(map, marker);
                  });
              })(marker, data);
          }
      }
  
  &lt;/script&gt;
  &lt;div id="dvMap" style="width: 1600px; height: 900px"&gt;
  &lt;/div&gt;
      &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:ConString %&gt;" SelectCommand="SELECT * FROM [******]"&gt;&lt;/asp:SqlDataSource&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>
  </p>