streetView panoOptions: addressControlOptions: style not being honored?

1,380 views
Skip to first unread message

fearless_fool

unread,
Apr 6, 2011, 1:13:01 AM4/6/11
to Google Maps JavaScript API v3
Using

http://code.google.com/apis/maps/documentation/javascript/examples/streetview-controls.html

as a starting point, I can't seem to change the color of the address
box or the font color. The relevant code is:

var panoOptions = {
position: fenway,
addressControlOptions: {
position: google.maps.ControlPosition.BOTTOM,
style: {
"fontWeight": "bold",
"backgroundColor": "#191970",
"color": "#A9203E"
}
},

If I change backgroundColor and color to something radically
different, e.g. "#ffffff" and "#000000" (respectively), I don't see
any change in the displayed graphics. I've tried this in both Chrome
10.0.648.204 and in Firefox 4.0.

[A]: Is anyone else observing this?

[B]: In fact, I want to disable the address box altogether. If the
alpha channel is honored, I can just make it transparent. Is there a
better way?

Remi Grumeau

unread,
May 22, 2011, 9:19:38 PM5/22/11
to google-map...@googlegroups.com
You should consider using a previous version of the API.

Your code doesn't work using
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
neither
<script src="http://maps.google.com/maps/api/js?sensor=false&v=3.4" type="text/javascript"></script>
but works like a charm using
<script src="http://maps.google.com/maps/api/js?sensor=false&v=3.3" type="text/javascript"></script>

Remi

Marc Ridey

unread,
May 22, 2011, 9:48:24 PM5/22/11
to google-map...@googlegroups.com
How to show/hide the address control

    panorama.set('addressControl', true/false);

or

    panorama.setOptions({
      addressControl: true/false
    });

See http://blog.mridey.com/2010/05/controls-in-maps-javascript-api-v3.html

Marc

Chris Broadfoot

unread,
May 22, 2011, 10:42:07 PM5/22/11
to google-map...@googlegroups.com
On Wed, Apr 6, 2011 at 3:13 PM, fearless_fool <rdp...@gmail.com> wrote:
[A]: Is anyone else observing this?

Yes, we actually removed this some time during 3.4
 
[B]: In fact, I want to disable the address box altogether.  If the
alpha channel is honored, I can just make it transparent.  Is there a
better way?

Yep. Pass "addressControl: false" with your StreetViewPanoramaOptions:

Chris

--
http://twitter.com/broady
Reply all
Reply to author
Forward
0 new messages