Can Infobox be moved from the center?


  • I have a Bing maps I am working on for a web page.  It has a pushpin at the center which is good.

    I am trying to add just a box with some text and one HTML link to a larger, full-page Bing Map.  This is showing up in the center where the pushpin is.  I would like to have it at the top left of the map if possible, similar to what I see on some sites that use Google maps. 

    If not possible for top left, can the infobox be moved at all, such as up or to a side?

    Thanks for your help.  I've tried to find this online but everywhere I look at I see is "center" for the Infobox.

    Friday, October 26, 2018 8:53 PM

All replies

  • Hi JRSac,

    Have you tried changing the values in the interactive SDK to see if you can get what you want from the custom inforbox?

    You can modify the values then press the green circle with the white arrow to get the code to run.



    Saturday, October 27, 2018 5:36 PM
  • This doesn't seem to allow movement of the actual box itself but only content within the box.  I have not found anything where I can reposition the infobox; unless I'm just missing it.
    Sunday, October 28, 2018 12:06 AM
  • You place the box where you want it. To move it, place it somewhere else.  See

    setLocation(loc: Location) Sets the location on the map where the anchor of the infobox is attached.

    Monday, October 29, 2018 10:25 PM
  • Thank you for your response. I was hoping to just move the box to the top left corner of the map; so that, if the browser or map is resized by the user the box stays consistently at the top left.  Also, this would work on different screens sizes and mobile.  There is no apparent way to do this I have found. 

    While I could anchor the box based on the suggestion, I have to pick a point on the map and try to get one where the box will show on screen resizes or different screen sizes.  Also, the map can be zoomed in and out by the user which would affect the appearance of a box locked to a given longitude and latitude coordinate position.  This isn't quite what I was hoping to do.

    I did try putting a bogus location halfway around the world in as the infobox anchor point.  This seems to make the box go to the top left corner; but, I'm not sure this is a good way to do this or if it will work on other browser types, etc. 

    Tuesday, October 30, 2018 7:01 PM