hi everybody,

i still have this problem. the infotext does not match (only in IE,
sometimes and sometimes not - timing issue?) with the marker point.
anybody can help? here is my code: thanks a lot, folks!



<script type="text/javascript">

    var map;
    var gdir;
    var geocoder = null;
    var addressMarker;




    function initialize() {
      if (GBrowserIsCompatible()) {

        map = new GMap2(document.getElementById("map_canvas"));
        gdir = new GDirections(map, document.getElementById
("directions"));
        GEvent.addListener(gdir, "load", onGDirectionsLoad);
        GEvent.addListener(gdir, "error", handleErrors);





        // Standorte festlegen
        var standort = new Array();

        // Infotexte festelegen
        var infotext = new Array();



        standort[0]= "Street a ZipCode Location 0";
        standort[1] = "Street a ZipCode Location 1";
        standort[2] = "Street a ZipCode Location 2";
        standort[3] = "Street a ZipCode Location 3";
        standort[4] = "Street a ZipCode Location 4";
        standort[5] = "Street a ZipCode Location 5";


        infotext[0] = "<html><font face=verdana, arial size=2>Infotext
for Location 0<br />Some Text<br />More Text</font></html>";
        infotext[1] = "<html><font face=verdana, arial size=2>Infotext
for Location 1<br />Some Text<br />More Text</font></html>";
        infotext[2] = "<html><font face=verdana, arial size=2>Infotext
for Location 2<br />Some Text<br />More Text/font></html>";
        infotext[3] = "<html><font face=verdana, arial size=2>Infotext
for Location 3<br />Some Text<br />More Text/font></html>";
        infotext[4] = "<html><font face=verdana, arial size=2>Infotext
for Location 4<br />Some Text<br />More Text</font></html>";
        infotext[5] = "<html><font face=verdana, arial size=2>Infotext
for Location 5<br />Some Text<br />More Text</font></html>";










       // ###################
        geocoder = new GClientGeocoder();



      var helpcount = 1;

       for (var i = 0; i < standort.length; i++) {


        geocoder.getLatLng(
          standort[i],
          function(point) {
            if (!point) {
              alert(standort[i] + " not found");
            } else {



                    map.setCenter(point, 7);



                    var Icon = new GIcon(G_DEFAULT_ICON);
                    Icon.image = "my-symbol.gif";
                    Icon.iconSize = new GSize(32, 39);
                    Icon.shadowSize = new GSize(42, 39);


                    markerOptions = { icon:Icon };





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


                  map.addOverlay(createMarker(point,infotext
[helpcount]));

                  helpcount++;


            }
          }
        );

        }
        //Ende for-Schleife
        // ###################





          var customUI = map.getDefaultUI();

        customUI.maptypes.hybrid = false;
        map.setUI(customUI);





      }
    }


    </script>




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