Can I define an offset for the position of standard Map Controls like MapType and Zoom?

1,021 views
Skip to first unread message

Coen de Jong

unread,
Feb 17, 2012, 8:57:36 AM2/17/12
to google-map...@googlegroups.com
Test website to see the problem: http://labs.shifthappens.nl/vagabond/pilot/

I have a navigation bar at the top, but the map is behind this element and therefore the MapType control and the Zoom control are not usable. I know I can set the position of a control with the ControlPosition constants, but this is not enough. I would like to set an offset so it doesn't default to the top most position. How can I do this without building my own custom controls and all?

Best Regards,

Coen de Jong

Enoch Lau (Google Employee)

unread,
Feb 21, 2012, 5:54:07 PM2/21/12
to google-map...@googlegroups.com
To offset the position of standard map controls, you could try inserting a transparent div into the same control position as the standard map control, effectively pushing the standard control away from its normal position. You could set the index property to position your transparent div relative to the standard map control: http://code.google.com/apis/maps/documentation/javascript/controls.html#CustomPositioning

Enoch

Coen de Jong

unread,
Feb 26, 2012, 7:47:03 AM2/26/12
to google-map...@googlegroups.com
Cool, thanks! In the end we changed the design so the menu doesn't seem to float on the map, so the problem is irrelevant now, but in the future this might be the solution.

chris marx

unread,
Jul 2, 2013, 12:05:12 PM7/2/13
to google-map...@googlegroups.com
There is also an issue for this, please vote for it-

en4ce

unread,
Jul 9, 2013, 10:45:57 AM7/9/13
to google-map...@googlegroups.com
voted as well
Reply all
Reply to author
Forward
0 new messages