The map already has a panorama by default. If you create your own panorama to replace it, you need to link the map and the panorama using map.setStreetview(panorama). Without a test link, it's hard to guess but I would think that's the issue.
Marc On Sun, Oct 2, 2011 at 4:40 AM, dbrb2 <[email protected]> wrote: > I have a google v3 map with streetview pegman control. > > The map also contains a marker, which is periodically moved. > > I wanted to be able to see this marker when I was in streetview mode, so I > created a panorama: > I created a panorama: > > var panoramaOptions = { > addressControl: false, > enableCloseButton: true, > pov: { > heading: 90, > pitch: 0, > zoom: 0 > } > }; > > > panorama = new > google.maps.StreetViewPanorama(document.getElementById("map_canvas"),panoramaOptions); > > (note the panorama is in the map_canvas div - the same div used for the > map) > > I hope then that, if I enabled the panorama (by dragging the pegman onto > the map), if I panned to the correct location I would see any markers that I > had placed on that map using the: > > marker2.setPosition(latlng); > > where latlng is a position, and marker2 was created with: > > marker2 = new google.maps.Marker({ > position: latlng, > cursor: "http://maps.google.com/mapfiles/openhand.cur", > icon: "marker.png", > map: panorama > }); > > > But instead, though streetview loads, I see no markers. > > Am I doing something obviously wrong? > > Cheers, > > Ben > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-maps-js-api-v3/-/cwyuPrdWaBwJ. > 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. > -- 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.
