|
||||||||||
|
|||||||
| GoogleCommunity Sponsor |
|
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Noogle
![]() Join Date: May 2009
Posts: 0
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Programming Google Street View (need assistance!)
I am trying to find out a specific line of code for this of code. It is a Google street map showing where the points that they are addressed to and showing you a street view of where its located if possible (meaning that when you enter your latitude and longitude it will show you your position on Google map and a street view of where its located). The whole code works well but when I enter a different set of coordinates 44.8021, 22.4231 instead of the coordinates already set when I found the code 37.4419, -122.1419 it dose not show the street view when its the correct coordinates. The line of code is on line 14&15. The working coordinates are commented out (line 15) and the incorrect ones are not commented due to testing purposes. The solution should be about the same coordinates but it should be written differently If you know the solution to this problem or have a reasonable answer feel free to email me or post another message relating towards this.
<!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: Map Info Window</title> <script src= //My key went here. type="text/javascript"></script> <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); var latlng = new GLatLng(44.8021, 22.4231); //var latlng = new GLatLng(37.4419, -122.1419); map.setCenter(latlng, 13); map.openInfoWindowHtml(map.getCenter(), '<div id="whatever">hey<div id="streetview"></div><br style="clear: both;" /></div>'); setTimeout(function() { var myStreetView = new GStreetviewPanorama(document.getElementById("stree tview")); myStreetView.setLocationAndPOV(latlng); // alert(latlng); }, 1000); } } </script> </head> <body onload="initialize()" onunload="GUnload()"> <div id="map_canvas" style="width: 500px; height: 300px"></div> </body> </html> |
|
|
|
|
Sponsored Links
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stop Google Street View Now! | stopgooglestreetview | Introduce Yourself | 0 | 04-10-2009 05:38 AM |
| Google's Street View in NZ soon - Stuff.co.nz | News Alerts | Google in the News | 0 | 08-03-2008 05:33 PM |
| Google maps: street view | leftybogs | Google Earth & Google Maps | 2 | 05-15-2008 11:00 AM |
| Google Street View - Canada.com | News Alerts | Google in the News | 0 | 09-13-2007 12:17 PM |