Created
April 20, 2012 13:46
-
-
Save betobaz/2428802 to your computer and use it in GitHub Desktop.
Google street view api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map; | |
var panorama; | |
(function() { | |
var tt = new google.maps.LatLng(18.851874,-97.101803); | |
var mapOptions = { | |
center: tt, | |
zoom: 14, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, | |
streetViewControl: false | |
}; | |
// Creación del map | |
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); | |
// Configuraciones y Creación del stre | |
panorama = new google.maps.StreetViewPanorama( | |
document.getElementById('map_canvas'), | |
{ | |
enableCloseButton: true, | |
panoProvider: function(pano) { | |
if (pano=='google') { | |
// markerStreetView.set('visible', true); | |
} | |
return { | |
location: { | |
pano: 'tt', | |
latLng: tt, | |
description: '' | |
}, | |
copyright: 'betobaz', | |
links: [], | |
tiles: { | |
tileSize: new google.maps.Size(512, 512), | |
worldSize: new google.maps.Size(8192, 4096), | |
centerHeading: 50, | |
getTileUrl: function(room, zoom, x, y) { | |
return 'http://hazfutbol.com/img/panoram/pp_' + | |
zoom + '_' + x + '_' + y + '.jpg'; | |
} | |
} | |
}; | |
}, | |
pano: 'google' | |
} | |
); | |
map.setStreetView(panorama); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment