Removing the pegman from map

6,713 views
Skip to first unread message

Peter

unread,
Oct 8, 2010, 4:01:24 AM10/8/10
to Google Maps JavaScript API v3
Hello,

It looks like a change to the api code today has started showing the
streetview pegman on my map.

I am using

mapOptions.disableDefaultUI = true;

which hides the rest of the controls (pan/zoom/maptype) so I just have
the map and nothing else visible. I'd have expected this to remove the
pegman too.Does anyone know if there is another option for this?

Thanks

Peter

Marc Ridey

unread,
Oct 8, 2010, 6:16:59 AM10/8/10
to google-map...@googlegroups.com
You should be able to set streetViewControl:false in http://code.google.com/apis/maps/documentation/javascript/reference.html#MapOptions




--
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-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Peter

unread,
Oct 8, 2010, 7:57:42 AM10/8/10
to Google Maps JavaScript API v3
Thanks, that has done the trick.

I'm sure I looked at that documentation this morning and I didn't see
the streetViewControl option.

Thanks for your help.

Pete

brad

unread,
Oct 8, 2010, 1:28:22 PM10/8/10
to Google Maps JavaScript API v3
Would you know how to disable the pegman if you are using an
openlayers viewer instead of the google viewer?

On Oct 8, 6:16 am, Marc Ridey <mri...@google.com> wrote:
> You should be able to set streetViewControl:false inhttp://code.google.com/apis/maps/documentation/javascript/reference.h...
>
>
>
>
>
>
>
> On Fri, Oct 8, 2010 at 7:01 PM, Peter <peterasm...@gmail.com> wrote:
> > Hello,
>
> > It looks like a change to the api code today has started showing the
> > streetview pegman on my map.
>
> > I am using
>
> > mapOptions.disableDefaultUI = true;
>
> > which hides the rest of the controls (pan/zoom/maptype) so I just have
> > the map and nothing else visible. I'd have expected this to remove the
> > pegman too.Does anyone know if there is another option for this?
>
> > Thanks
>
> > Peter
>
> > --
> > 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-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .

arolletson

unread,
Oct 8, 2010, 8:42:19 AM10/8/10
to Google Maps JavaScript API v3
I sure wish I had Peter's magic touch! I agree, something changed
overnight. For months I have been explicitly declaring
'streetViewControl: false' as a mapOption when initializing a map. No
pegman. That no longer works as of this morning, and the pegman has
arrived unwanted to obscure details on my maps. Further invocations
of map.setOptions({streetViewControl: false}); also have no
effect and the pesky critter won't go away. Any more ideas?

Arolletson

On Oct 8, 6:16 am, Marc Ridey <mri...@google.com> wrote:
> You should be able to set streetViewControl:false inhttp://code.google.com/apis/maps/documentation/javascript/reference.h...
>
>
>
> On Fri, Oct 8, 2010 at 7:01 PM, Peter <peterasm...@gmail.com> wrote:
> > Hello,
>
> > It looks like a change to the api code today has started showing the
> > streetview pegman on my map.
>
> > I am using
>
> > mapOptions.disableDefaultUI = true;
>
> > which hides the rest of the controls (pan/zoom/maptype) so I just have
> > the map and nothing else visible. I'd have expected this to remove the
> > pegman too.Does anyone know if there is another option for this?
>
> > Thanks
>
> > Peter
>
> > --
> > 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-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .

Aaron Steele

unread,
Oct 8, 2010, 7:24:00 PM10/8/10
to google-map...@googlegroups.com
> Further invocations
> of map.setOptions({streetViewControl: false});   also have no
> effect and the pesky critter won't go away. Any more ideas?

Weird! Hiding the street view control is definitely working for me.
For example, try running the following code:

function initialize() {
var mapDiv = document.getElementById('map-canvas');
var map = new google.maps.Map(mapDiv, {
center: new google.maps.LatLng(37.4419, -122.1419),
zoom: 13,
streetViewControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
}

using the Google Code Playground:

http://code.google.com/apis/ajax/playground/#custom_controls_v3

Success?

Reply all
Reply to author
Forward
0 new messages