Detached Panorama Container
prernamedhe opened this issue · 2 comments
prernamedhe commented
@Raruto ...can you please help me to change a pano_div view to another div...
It means i doesn't want to show streetview paranoma on map ...I want to show that paranoma view in div of sidebar-v2 -leaflet ......Thanks in advance
Raruto commented
Sorry, I did not understand well, do you intend to display the pano_div
outside the map container? (eg. next to the current leaflet map)
Raruto commented
if that's what you meant, from version 0.1.1 you can do as below:
<div id="map" class="map"></div>
<div id="pano-div" class="pano-canvas"></div> <!-- external panorama container -->
<script>
var map = L.map('map');
var pegmanControl = new L.Control.Pegman({
position: 'bottomright',
theme: "leaflet-pegman-v3-default",
panoDiv: "#pano-div" // panorama div css selector
});
pegmanControl.addTo(map);
</script>