These are the jscript functions you need ... This function takes an address as a string
function showAddress(thisaddress)
{
var geocoder = new GClientGeocoder();
geocoder.setBaseCountryCode("uk");
geocoder.getLatLng(thisaddress, gotPoint);
searchaddress=thisaddress
}
The next function is called by the one above in order to show the address or marker on a map Note that I've commented out the code that places a marker at the point
function gotPoint(pt)
{
if (!pt)
{alert(searchaddress + " not found");}
else
{
// map.setCenter(point, 13);
// var marker = new GMarker(point);
// map.addOverlay(marker);
// marker.openInfoWindowHtml(thisaddress);
document.formInput.txtPoint.value = pt;
panoClient.getNearestPanoramaLatLng(pt, fnearestpano);
}
}
Finally, the function finds the nearest StreetView image to the address
function fnearestpano(latlng)
{
if (!latlng)
{ alert("nearest view not found"); }
else
{
//alert("point=" + latlng);
myPano = new GStreetviewPanorama(document.getElementById("pano"));
myPano.setLocationAndPOV(latlng, myPOV);
}
}
Hope that helps? Richard