24 lines
820 B
JavaScript
24 lines
820 B
JavaScript
function showPanoData(panoData) {
|
|
if (panoData.code != 200) {
|
|
return;
|
|
}
|
|
$('#pp-cb-thumb').replaceWith(
|
|
'<div id="pp-cb-thumb"><div class="left">' +
|
|
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
|
|
panoData.location.panoId +
|
|
'&zoom=1&x=0&y=0&cb_client=maps_sv" />' +
|
|
'</div>' +
|
|
'<div class="right">' +
|
|
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
|
|
panoData.location.panoId +
|
|
'&zoom=1&x=1&y=0&cb_client=maps_sv" />' +
|
|
'</div></div>');
|
|
|
|
$('#legende-photo' ).css('display','block');
|
|
$('#pp-cb-thumb' ).css('display','block');
|
|
}
|
|
|
|
function doShowPanoData(ll) {
|
|
var panoClient = new GStreetviewClient();
|
|
panoClient.getNearestPanorama(ll, showPanoData);
|
|
}
|