Hello,
I'm trying to show addresses on the map, but not all the addresses are 
showed. My code looks as follows:
    
    var map = null;
    var geocoder = null;
    bounds = new GLatLngBounds;

    function createMarker(point, contentMoved, contentClicked, scale, 
present)
    {
        var ico = new GIcon(G_DEFAULT_ICON);
        if(present > 0) ico.image = "./img/puppet_green.png";
        else ico.image = "./img/puppet.png";

        markerOptions = { icon:ico };
        map.setCenter(point, scale);
        var marker = new GMarker(point, markerOptions);

        GEvent.addListener(marker, "click", function()
        {
            if(contentMoved != "") 
marker.openInfoWindowHtml(contentClicked);
        });

        GEvent.addListener(marker, "mouseover", function()
        {
            if(contentMoved != "") 
marker.openInfoWindowHtml(contentClicked);
        });
        
        return marker;
    }


    function showAddress(address, contentMoved, contentClicked, scale, 
present)
    {
        geocoder.getLatLng(
            address, function(point)
            {
                        if(point)
                        {
                            bounds.extend(point);
                            map.setCenter(bounds.getCenter(), 
map.getBoundsZoomLevel(bounds));

                            map.addOverlay(createMarker(point, contentMoved, 
contentClicked, scale, present));
                        }
           }
        );
    }
    
    
    function initialize()
    {
        map = new GMap2(document.getElementById("map_canvas"));
        geocoder = new GClientGeocoder();
        map.setUIToDefault();
        
        <?php 
        foreach($dataArray as $currCity)
        {
            ...
            ...
            ...
            ?>
            showAddress('<?php echo $currCityArray[0] ?>', '<?php echo 
$stringMove ?>', '<?php echo $stringClick ?>', 5, <?php echo $sh ?>);
            <?php
        }
        ?>
    }


So I'm generating the calls of showAddress function using PHP for loop. 
Problem is if I generate a lot of addresses, e.g. 30. About 10 addresses are 
showed correctly but the rest not. Addresses are correct - if I skip first 
10 addresses, further 10 addresses are showed correctly.

So I'm a bit confused. Where could be a problem, please? Thanks a lot, 
Lukes.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to