Ah, got it now.

I was adding the panorama object after adding the markers, and this
wasn't working.

So the logic is now:
1 - create map
2 - add custom panorama (set lat/lngs, close button etc)
3 - set panorama to be hidden: panorama.setVisible(false);
3 - add markers to street map

This works as expected, although it's a little slow on initial load
because it's initialising the custom panorama. Feels like there could
be a better way to do this...


Thanks,
Gavin

On Jun 9, 9:06 am, Marc Ridey <mri...@google.com> wrote:
> If you don't want the markers to appear by default in the panorama, use a
> custom panorama.
> You can still give it the same DIV as the map if you want them to appear at
> the same location.
> Just have:
>
> var map = new google.maps.Map(div, ...);
> var panorama = new google.maps.StreetViewPanorama(div, ...);
> map.setStreetView(panorama);
>
> There a few threads in the group on the same subject.
>
> Marc
>
> On Wed, Jun 9, 2010 at 5:54 PM, gardnose <in...@abergavenny.org.uk> wrote:
> > Thanks Marc,
>
> > Think I'm still missing something here. What I want is to use
> > 'streetViewControl:true' to enable the pegman control.
> > Then when I drop the pegman onto the map, I'd like to hide the
> > markers.
>
> > You can see what I'm trying to do here:
> >http://www.abergavenny.org.uk/accommodation.htm
>
> > I've just had a look through this thread but can't find what I'm
> > looking for:
>
> >http://groups.google.com/group/google-maps-js-api-v3/browse_thread/th...
>
> > Is there an event for "pegman dropped" which I can use to hide the
> > markers?
>
> > Thanks,
> > Gavin
>
> > On Jun 8, 10:57 pm, Marc Ridey <mri...@google.com> wrote:
> > > It doesn't affect the pegman support. Add streetViewControl:true in the
> > map
> > > options to turn on the pegman.
>
> > > On Tue, Jun 8, 2010 at 11:07 PM, gardnose <in...@abergavenny.org.uk>
> > wrote:
> > > > How would this work with the standard map option for
> > > > 'streetViewControl:true'?
>
> > > > I'd prefer to avoid creating my own maptypecontrol and pegman
> > > > functionality just to hide the markers for a streetview.
>
> > > > Failing that - are there any events associated with the standard
> > > > streetViewControl that I can use?
>
> > > > Thanks,
> > > > Gavin
>
> > > > On May 26, 2:28 am, Marc Ridey <mri...@google.com> wrote:
> > > > > StreetVIew and Map share their markers.
> > > > > To avoid having the two view share markers, create a panorama and
> > assign
> > > > it
> > > > > to the map.
> > > > > Such as:
>
> > > > > var panorama = new google.maps.StreetViewPanorama(map.getDiv());
> > > > > map.setStreetView(panorama);
>
> > > > --
> > > > 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
> > > > google-maps-js-api...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-maps-js-api-v3+unsubscr...@googlegroups.com<google-maps-js-api-v3%2bunsubscr...@googlegroups.com>
> > <google-maps-js-api-v3%2bunsubscr...@googlegroups.com<google-maps-js-api-v3%252bunsubscr...@googlegroups.com>
>
> > > > .
> > > > 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
> > google-maps-js-api...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-api-v3+unsubscr...@googlegroups.com<google-maps-js-api-v3%2bunsubscr...@googlegroups.com>
> > .
> > 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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to