Sorry, append to the above reply. The second code kicks the bubble out when we set a Googfle map on the page from admin. We can pick any one of 4 maps, We prefer Google. But now it's infowindow disappears :(
On Nov 9, 4:07 pm, streetview99 <[EMAIL PROTECTED]> wrote: > OK Thanks you all. I got the POV angle right when I hardcoded this > page >>http://www.easysavannahlive.com/listing1.htmlby trial & > error. But these listings are tied to street addresses in MySql in a > phpmydirectory.com business directory. We were so close. My perrson > who has arranged the coding for this has switched to this code here > >http://www.tulsaview.com/Johny-Carinos.html. It angles better than > the first w/ the default north I think, obviously, but now it kicks > the infowindow/bubble out that had contact info & driving directions. > Below is the relative code snip: > > <script type="text/javascript" src="http://maps.google.com/maps? > file=api&&v=2.x&key=ABQIAAAAJ2uU0fyJzu5tZPu7ABycOBQXwcuN3Stw9SMgl9vDTGogEtk2MBTTDl4sVaPGoO5OeJJvyQdP9sHuHg > "></script> > <script type="text/javascript"> > var map; > var myPano; > var panoClient; > var houseMarker; > > function initialize() { > panoClient = new GStreetviewClient(); > map = new GMap2(document.getElementById("map_canvas")); > map.setCenter(new GLatLng(36.021802,-95.949298), 15); > map.addControl(new GSmallMapControl()); > map.addControl(new GMapTypeControl()); > > houseMarker = new GMarker(new > GLatLng(36.021802,-95.949298 )); > map.addOverlay(houseMarker); > > GEvent.addListener(houseMarker, "dragend", function() { > panoClient.getNearestPanorama(houseMarker.getLatLng(), > showPanoData); > }); > > myPano = new > GStreetviewPanorama(document.getElementById("pano")); > panoClient.getNearestPanorama(houseMarker.getLatLng(), > showPanoData); > } > > function showPanoData(panoData) { > if (panoData.code != 200) { > GLog.write("showPanoData: Server rejected with code: " + > panoData.code); > return; > } > var angle = computeAngle(houseMarker.getLatLng(), > panoData.location.latlng); > myPano.setLocationAndPOV(panoData.location.latlng, {yaw: > angle}); > } > > function computeAngle(endLatLng, startLatLng) { > var DEGREE_PER_RADIAN = 57.2957795; > var RADIAN_PER_DEGREE = 0.017453; > > var dlat = endLatLng.lat() - startLatLng.lat(); > var dlng = endLatLng.lng() - startLatLng.lng(); > // We multiply dlng with cos(endLat), since the two points are > very closeby, > // so we assume their cos values are approximately equal. > var yaw = Math.atan2(dlng * Math.cos(endLatLng.lat() * > RADIAN_PER_DEGREE), dlat) > * DEGREE_PER_RADIAN; > return wrapAngle(yaw); > } > > function wrapAngle(angle) { > if (angle >= 360) { > angle -= 360; > } else if (angle < 0) { > angle += 360; > } > return angle; > }; > > </script> > > <body onload="initialize()" onunload="GUnload()"> > <div id="map_canvas" style="width: 366px; height: 300px"></div> > <div name="pano" id="pano" style="width: 366px; height: 250px"></ > div> > </body> > > Ideas? Both the sites shown are in development. I'd visited back > earlier but I didn't think my posts were going to post. I don't have > any other code from the php as I don't have it installed yet. I just > helped pay for it. My guy is trying to figure it out. Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
