Hi!
When I use back and forward arrows in my street view div to move along the street, it suddenly starts moving along the street by it self. Why is this happening? Is this some kind of a bug or is something wrong with my code??? Please help. Here is the link to my maps: http://mvacation.20m.com/ When the map loads, click "More..." button and check "Street view" checkbox. Then just click on some road that supports street view and use back and forward arrows in street view DIV to move along the street. Try moving forward and then back on the same street. Here is the code for loading Street view: myStreetviewPanorama = new GStreetviewPanorama(document.getElementById ("street_view_div")); GEvent.addListener(myStreetviewPanorama, "error", handleNoFlash); GEvent.addListener(myStreetviewPanorama, "initialized", function (call) { guyMarker.setLatLng(call.latlng); }); GEvent.addListener(map,"click", function(overlay,latlng) { if(StreetViewOverlayVisible()) { var panoClient = new GStreetviewClient(); panoClient.getNearestPanorama(latlng, function(panoData) { if (panoData.code == 200) { myStreetviewPanorama.setLocationAndPOV(latlng); if (streetViewDivVisible == false) { showdiv("street_view_div", latlng); } //Just a guy marker where current street view is shown if (guyMarker != null) { map.removeOverlay(guyMarker); } guyMarker = new GMarker(latlng, {icon: guyIcon, draggable: true}); GEvent.addListener(guyMarker, "dragend", onguyMarkerDragEnd); map.addOverlay(guyMarker); lastGuyMarkerLocation = latlng; } }); } }); function onguyMarkerDragEnd() { var panoClient = new GStreetviewClient(); panoClient.getNearestPanorama(guyMarker.getLatLng(), function (panoData) { if (panoData.code == 200) { myStreetviewPanorama.setLocationAndPOV(guyMarker.getLatLng()); //map.setCenter(new GLatLng((guyMarker.getLatLng().lat() - 0.003), guyMarker.getLatLng().lng())); lastGuyMarkerLocation = guyMarker.getLatLng(); } else { guyMarker.setLatLng(lastGuyMarkerLocation); } }); } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
