Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom Position Non Custom Control Google Maps (v3 API)
    primarykey
    data
    text
    <p>I would like to be able to adjust the position of the map type control. I have it set to top right however I need to drop it by about 50 pixels. I read on custom controls you can pad the DIV, what about non custom controls? Can I extend the control?</p> <p>Below is the HTML generated by the API for the control:</p> <pre class="lang-html prettyprint-override"><code>&lt;div class="gmnoprint" style="margin: 5px; z-index: 11; position: absolute; cursor: pointer; text-align: left; top: 0px; right: 0px;"&gt; &lt;div style="width: 80px; position: relative; overflow: hidden; border: 1px solid black;"&gt; &lt;div style="color: black; font-family: Arial,sans-serif; -moz-user-select: none; font-size: 12px; background-color: white; padding: 0px 5px; font-weight: bold; border-width: 1px; border-style: solid; border-color: rgb(112, 112, 112) rgb(208, 208, 208) rgb(208, 208, 208) rgb(112, 112, 112);" title="Change map style"&gt;Map&lt;img style="position: absolute; right: 4px; top: 4px; display: block;" src="http://maps.gstatic.com/intl/en_us/mapfiles/down-arrow.gif"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div style="border: 1px solid black; width: 80px; display: none;"&gt; &lt;div style="color: black; font-family: Arial,sans-serif; -moz-user-select: none; font-size: 12px; background-color: white; padding: 1px 5px;" title="Show street map"&gt;Map&lt;/div&gt; &lt;div style="color: black; font-family: Arial,sans-serif; -moz-user-select: none; font-size: 12px; background-color: white; padding: 1px 5px;" title="Show satellite imagery"&gt;Satellite&lt;/div&gt; &lt;div style="color: black; font-family: Arial,sans-serif; -moz-user-select: none; font-size: 12px; background-color: white; padding: 1px 5px;" title="Show imagery with street names"&gt;Hybrid&lt;/div&gt; &lt;div style="color: black; font-family: Arial,sans-serif; -moz-user-select: none; font-size: 12px; background-color: white; padding: 1px 5px;" title="Show street map with terrain"&gt;Terrain&lt;/div&gt; &lt;/div&gt;&lt;/div&gt; </code></pre> <p>As an interim solution I am using the following jquery code to alter the padding of this specific control:</p> <pre class="lang-js prettyprint-override"><code>$('[title="Change map style"]').parent().css('padding-top', '36px'); </code></pre> <p>Far from ideal, but does the job in this case :/</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload