GMap: Initialize Streetview ONLY (without a roadmap)

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!

+3
source share
2 answers

, . http://gmap3.net/api/set-street-view.html :

CSS

.gmap3,.googlemap {
  margin: 20px auto;
  border: 1px dashed #C0C0C0;
  width: 1000px;
  height: 500px;
}

HTML

<div id="test1" class="gmap3"></div><div class="googlemap"></div>
+2

All Articles