Hi,
I was trying to plot several uk post codes on google maps and I also
need differnt tooltips and maker content.
But I was getting same tooltip and maker text for all makers..
The code is
php code:
for($i=0;$i<count($property);$i++)
{
$ot.='usePointFromPostcode_top("'.$property[$i]
['postcode'].'","'.
$property[$i]['tooltip'].'","'.$property[$i]['data'].'",cbfunction);';
}
Javascript Code:
function usePointFromPostcode_top
(postcode,tooltip,data,callbackFunction) {
//alert("maploaded");
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(tooltip,data,point);
} else {
alert("Postcode not found!");
}
});
localSearch.execute(postcode + ", UK");
}
function cbfunction(tooltip,data,point)
{
mapAddPoint(blueIcon, point.lat(),point.lng(),tooltip,data);
}
since this asyncronous I am getting same marker and tool tip..
but if I keep a alert in usePointFromPostcode_top it works..
Please suggest me a method so that one postcode search should follow
another synchronously not in asynchrous.
Please help.
http://pavaniakella.site90.com/googlemaps/example.php
is the link for this script.I kept the script here as I am working on
local setup.
The one with alert in js function which is working fine is
http://pavaniakella.site90.com/googlemaps/example1.php
Regards,
Pavani
--
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.