Hi,

I'm trying to build gmap API where its shows markers with info window
popping up on mouse hover. It works find in Firefox, but am getting
'unterminated string constant' error in IE. Below is the code


<!--#include virtual="/includes/sqlDBConn.asp" -->
<!--#include virtual="/includes/safefunctions.asp" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
    <title>Google Maps JavaScript API Example</title>
    <script src="http://maps.google.com/maps?
file=api&amp;v=2.x&amp;key=ABQIAAAASkdTx-
xrMIvAXHXAtEM9qRSXMGIOLlzvaf_QcvWUg2yOnfxd2xTJk90A_X6gK8M0z0puIJwGyF4uTg"
      type="text/javascript"></script>
    <script type="text/javascript"> </script>

   <script src="http://www.google.com/uds/api?
      file=uds.js&v=1.0&key=ABQIAAAASkdTx-
xrMIvAXHXAtEM9qRSXMGIOLlzvaf_QcvWUg2yOnfxd2xTJk90A_X6gK8M0z0puIJwGyF4uTg"
      type="text/javascript"></script>

  <script type="text/javascript">
//<![CDATA[

               var geocoder = new GClientGeocoder();
               var map;
               var icon = new GIcon(G_DEFAULT_ICON);
               icon.image = "http://www.google.com/mapfiles/
marker.png";
               icon.shadow = "http://www.google.com/mapfiles/
shadow50.png";

               icon.iconSize = new GSize(20, 34);
               icon.shadowSize = new GSize(37, 34);
               icon.iconAnchor = new GPoint(10, 34);

function mapLoad() {
        if (GBrowserIsCompatible()) {
                map = new GMap2(document.getElementById("map_canvas"));
                map.addControl(new GLargeMapControl());
                map.addControl(new GMapTypeControl());
                map.setCenter(new GLatLng(54.622978,-2.592773), 5, 
G_HYBRID_MAP);
                setpoints();
        }

}

function setpoints()
{
  <%
      SQLstr="SELECT TOP 10 PostCode,Name,Address,Amount FROM
plugin_RSMCallBackData WHERE Country LIKE 'GBR' ORDER BY ID DESC"
      Set rs = sqlDBconn.Execute(SQLstr)
      dim myarray
      myarray=rs.GetRows()
      rs.close
       %>
  <%
       For i = 0 To Ubound(myarray,2)
          %>
          var postval = "<%=myarray(PostCode,i)%>";
          var last_index = postval.indexOf(' ');
          var splitpost = postval.substring(0,last_index);
          var amount = "<%=myarray(3,i)%>";
          var html = 'Thank you for donating '+ amount;
          usePointFromPostcode(splitpost,html);
          <%
          Next
          %>
}

function usePointFromPostcode(postcode,text) {

geocoder.getLatLng(postcode, function(point) {
        if (!point) {
            //alert('address not found');
        } else {
            var marker = new GMarker(point,{icon: icon});
            GEvent.addListener(marker,'mouseover', function() {
                marker.openInfoWindowHtml(text);
            });
            map.addOverlay(marker);
        }
    });
}
//]]>

</script>
 </head>

         <body onload = "mapLoad();" onunload = "GUnload();" >
        <div id="map_canvas" style="width: 400px; height: 600px" > </div>

</body>
</html>

I dont think GEvent.addListener is the real culprit, but who else I'm
not able to figure out. Can anyone assist whats going wrong in the
code?

heres the link http://doteditor.wateraid.org/temp/temp786.asp?

Thanks,
Nilesh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to