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.

Reply via email to