Hello,
I gave that a go - an excerpt from the code that sets up the map is
shown below:
function initialize(){
var latlng = new google.maps.LatLng(51.511589,-0.132043);
var myOptions = {
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
streetViewControl: true
}
map = new google.maps.Map(document.getElementById("mapCanvas"),
myOptions);
//panorama = map.getStreetView();
panorama = map.getStreetView(new
google.maps.StreetViewPanorama(document.getElementById('mapCanvas')));
panorama.setOptions({
enableCloseButton: true,
navigationControlOptions: {
position: google.maps.ControlPosition.TOP_LEFT,
style: google.maps.NavigationControlStyle.ZOOM_PAN
}
});
Where mapCanvas is the name of my map div. The suggested line to break
the link between markers on the map and on the panorama seems to
result in a blank panorama appearing on page load with no way to exit
it. Any ideas?
The full source is at http://bbarker.co.uk/cycleHire/index.txt
Cheers,
Ben
On May 31, 12:39 am, Marc Ridey <[email protected]> wrote:
> If you add this code, the markers in the map will not be shared with
> StreetView.
>
> var map = new google.maps.Map(document.getElementById('map'), mapOptions);
> map.setStreetView(new
> google.maps.StreetViewPanorama(document.getElementById('map')));
>
> This creates a new panorama and places it in the same DIV as the map (so
> they share the same location) but breaks the sahring of markers between
> StreetView and the Map.
> If you still need some markers in StreetView,
> checkhttp://blog.mridey.com/2010/05/events-markers-infowindows-and-overlay...
>
> Marc
>
> On Mon, May 31, 2010 at 7:42 AM, dbrb2 <[email protected]> wrote:
> > I would find this very useful... I have a map with many markers, and
> > don't want them all to appear when I go into streetview - but at the
> > moment my only option is to loop through each and do setMap(null) to
> > disable, or setMap(map) to reneabale - which is slow (especially in
> > IE). It would be much nices simple to show or hide the element
> > containing the markers as needed.
>
> > Talking of streetview, I notice that in another thread someone has
> > noticed that in IE the "x" in the top-right of the streetview window
> > vanishes, so you can't get out of it. Someone responded to say it had
> > been fixed and would be available with the next release - any idea
> > when these releases are made?
>
> > On May 30, 3:13 pm, Thet Wai <[email protected]> wrote:
> > > I would like to hide floatShadow Pane & overlayShadow Pane in Google
> > > Map API V3.
>
> > > In V2, I used the following codes to hide them.
>
> > > map.getPane(G_MAP_FLOAT_SHADOW_PANE).style.display = "none";
> > > map.getPane(G_MAP_MARKER_SHADOW_PANE).style.display = "none";
>
> > > But in V3, I have no idea about hiding some panes from google map.
> > > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-maps-js-api-v3%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.