I can't get the marker to center in IE. It works in all other browsers
except for IE.

Here is my code:

<script type="text/javascript">

//<![CDATA[

    if (GBrowserIsCompatible()) {

      function createMarker(point,html) {
        // ======== Add a "directions" link ======
        html += '<br> <a href="http://maps.google.com/maps?
saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Directions<\/
a>';

        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }

      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(40.29688,-74.02760),15);
          map.checkResize();

      var point = new GLatLng(40.29688,-74.02760);
      var marker = createMarker(point,'<div style="width:
200px">COMPANY<br />ADDRESS<br />CITY, NJ<br />ZIP');
      map.addOverlay(marker);

    }

    else {
      alert("Sorry, the Google Maps API is not compatible with this
browser");
    }

    </script>

I am really in a bind here so any help is really appreciated. Thank
you very much!!

- John

--~--~---------~--~----~------------~-------~--~----~
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