Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9212105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:26:58+00:00 2026-06-18T01:26:58+00:00

I have a control which I am adding to the map using google maps

  • 0

I have a control which I am adding to the map using google maps v3, currently it looks like this:

enter image description here

See how the right pointing arrow is out to the side?

I am currently adding it using this code:

// Create a div to hold the control.
var controlDiv = document.createElement('div');
var controlUI = document.createElement('button');
controlUI.id = "out";
controlUI.innerHTML = "<i class='icon-chevron-right'></i>";
controlDiv.appendChild(controlUI);

Maps.map.controls[google.maps.ControlPosition.TOP_LEFT].push(controlDiv);

and it has the css…

#out {position:relative;top:5px;right:0;float:right;border:1px #aaa solid;border-left:0;padding:2px 4px;-webkit-border-top-right-radius: 2px;-webkit-border-bottom-right-radius: 2px;-moz-border-radius-topright: 2px;-moz-border-radius-bottomright: 2px;border-top-right-radius: 2px;border-bottom-right-radius: 2px;}

But the position is obviously a bit off. How can I make it so that the default controls move down in way for the custom control?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:27:00+00:00Added an answer on June 18, 2026 at 1:27 am

    To make things a bit easier on myself, and I suggest you do the same, is to just move the controls over to the other side, its not going to hurt anyone. And I believe it looks a lot nicer.

    To do this just add this to your map options

    mapTypeControl: false,
    panControl:true,
    panControlOptions: {
        position: google.maps.ControlPosition.RIGHT_TOP
    },
    zoomControl:true,
    zoomControlOptions: {
        position: google.maps.ControlPosition.RIGHT_TOP
    },
    streetViewControl:true,
    streetViewControlOptions: {
        position: google.maps.ControlPosition.RIGHT_TOP
    },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a composite control which emits HTML that looks like this <span id=myControl>
I have a listview control, to this control I am adding rows which contain
I have a user control which displays the currently logged in user's name. I
I have a JQuery control which has some private methods. I would like to
I have a ToolBar WPF control which has a Stackpanel docked to right. I
I have created user control container (panel actually) which dynamically adding and removing user
I have a Java applet which displays an interactive map. By using the scroll
I have a Openlayer web map with LayerSwitcher control added. I need this to
I have created a lookless control using silverlight 4. This control contains a textbox
I have a control which has a button on it. All the button does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.