I use the JQuery Gmap3 plugin and try to initialize only a street view, without a combination of street view and roadmap, and without the ability to switch between street view and map. Gmap3 contains only two examples in its documentation (http://gmap3.net/api/set-street-view.html):
Shows a roadmap and street view:
var fenway = [42.345573,-71.098326];
$('#test1').gmap3(
{ action:'init',
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: true,
center: fenway
},
{ action:'setStreetView',
id: 'test1-streetview',
options:{
position: fenway,
pov: {
heading: 34,
pitch: 10,
zoom: 1
}
}
});
or to switch between a roadmap and street view:
$('#test2').gmap3({
action:'init',
zoom: 18,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: false,
center: [40.729884, -73.990988]
});
$('#test2-toggle').click(function(){
$('#test2').gmap3({
action:'getStreetView',
callback:function(panorama){
var visible = panorama.getVisible();
if (visible) {
panorama.setVisible(false);
} else {
var map = $(this).gmap3('get');
panorama.setPosition(map.getCenter());
panorama.setPov({
heading: 265,
zoom:1,
pitch:0}
);
panorama.setVisible(true);
}
}
});
});
But, sorry, I tried, but did not find a working solution, how to simply start street view in the #streetview div.
I really appreciate any help, thanks in advance!