Skip to content

Instantly share code, notes, and snippets.

@betobaz
Created April 20, 2012 13:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betobaz/2428802 to your computer and use it in GitHub Desktop.
Save betobaz/2428802 to your computer and use it in GitHub Desktop.
Google street view api
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