Hi All,

I am implementing Google map on my website. I am retrieving multiple
postcodes from database and using GlocalSearch to get longitude and
latitude to show multiple markers on map. It was working fine till
last week and showing all markers.

Suddenly it stopeed working and it is showing only one marker at a
time. Have tried to debug the issue but didn't get much.

It looks like GlocalSearch is not returning proper values. Or some
issue with google api key.

I have also tried with my previous development versions on which it
was working fine but not now.
========================================================
My Code:

var map;
var localSearch = new GlocalSearch();

var gmarkers = [];
var htmls = [];
var i = 0;
var j = 0;
var tooltip = document.createElement("div");
var ptitle = [];
var pID = [];

var icon = new GIcon();
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 usePointFromPostcode(postcode, callbackFunction, title,
ProjectID) {
    ptitle[j] = title;
    pID[j] = ProjectID;
    j++;

    localSearch.setSearchCompleteCallback(null,
                function () {
                    if (localSearch.results[0]) {
                        var resultLat = localSearch.results[0].lat;
                        var resultLng = localSearch.results[0].lng;
                        var point = new GLatLng(resultLat, resultLng);

                        callbackFunction(point);
                    } else {
                        alert("Postcode not found!");
                    }
                });
    localSearch.execute(postcode + ", UK");
}

function placeMarkerAtPoint(point) {
    var marker = new GMarker(point);
    marker.tooltip = '<div class="tooltip"><a href="http://
rps.vuturevx.com/MapofEvidence/ProjectSummary.aspx?ProjectID=' +
pID[i] + '">' + ptitle[i] + '</a></div>';

    GEvent.addListener(marker, "click", function () {
        marker.openInfoWindowHtml(marker.tooltip);
    });

    gmarkers[i] = marker;
    htmls[i] = ptitle[i];
    i++;

    map.addOverlay(marker);

    //  ======  The new marker "mouseover" and "mouseout" listeners
======
    GEvent.addListener(marker, "mouseover", function () {

        //showTooltip(marker);
        tooltip.style.visibility = "hidden"
    }
                );
    GEvent.addListener(marker, "mouseout", function () {

        tooltip.style.visibility = "hidden"
    }
                );
}
=======================================================

Please suggest if anybody has any idea about it.

Thanks

Cheers

Amit

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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