Google Community
Latest Forums Rules Resources
Custom Search

Go Back   Google Community > Webmaster Forums > Web Design, Coding & Programming Forum

GoogleCommunity Sponsor

Reply
 
LinkBack Thread Tools Display Modes
Old 05-12-2009, 09:24 PM   #1 (permalink)
Noogle
 
Join Date: May 2009
Posts: 0
Thanks: 0
Thanked 0 Times in 0 Posts
XxIcedecknightxX is on a distinguished road
Post Google Stree Map Programming For Personal Website

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>
XxIcedecknightxX is offline   Reply With Quote
 
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Google Street View (need assistance!) XxIcedecknightxX All About Google 0 05-12-2009 09:30 PM
Displaying videos on static website without knowing programming. Katriina Web Design, Coding & Programming Forum 1 03-16-2009 02:46 AM
Displaying videos on static website without knowing programming. ThomasPaul Web Hosting Forum 2 01-06-2009 07:23 AM
Displaying videos on static website without knowing programming. ThomasPaul Web Hosting Forum 0 12-30-2008 09:41 PM


All times are GMT -8. The time now is 01:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004–2007 Google Community