Hello there, im fairly new to this website coding and could use a shove in the right direction, possible some sample code. I took programming in school 7 years ago, vb,c++, SQL, database drive sites. I don't remember to much anymore. Any ways i was wondering how i can pass a user entered address and pass it to google streeview and pull that image up.
I already have it going with the hardcoded samples, but want it to be based on what the surfer enters. Thanks for any ideas.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example: Streetview Click Example</title>
<script src="http://maps.google.com/maps?file=api&v=2.x&key=MY KEY"
type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var myPano = new GStreetviewPanorama(document.getElementById("pano"));
GEvent.addListener(myPano, "error", handleNoFlash);
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(42.345573,-71.098326), 14);
svOverlay = new GStreetviewOverlay();
map.addOverlay(svOverlay);
GEvent.addListener(map,"click", function(overlay,latlng) {
myPano.setLocationAndPOV(latlng);
});
}
}
function handleNoFlash(errorCode) {
if (errorCode == FLASH_UNAVAILABLE) {
alert("Error: Flash doesn't appear to be supported by your browser");
return;
}
}
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 500px; height: 300px"></div>
<div id="pano" style="width: 500px; height: 200px"></div>
</body>
</html>