Sizing V8 Map Control RRS feed

  • Question

  • I have a mapping app using V8 and bootstrap. I would like the map to dynamically change size to use the real estate available on the screen being used. How to I define that in the div to do that?
    Wednesday, May 16, 2018 4:32 PM

All replies

  • For the Bing Maps v8 mapcontrol, it just takes the height and width of the div.  

    The documentation for using the Mapcontrol can be found here:

    Wednesday, May 16, 2018 5:28 PM
  • Maybe I am missing something but this code specifies exact div size:

                    <div id='myMap1'> style='width:1600px; height:800px;'></div>

    If I do this no map is displayed. 

                    <div id='myMap1'></div>

    What should I have here for this to default to whatever size window is available?

    Wednesday, May 16, 2018 5:52 PM
  • The second one will normally fill all available space, but depending on where you host that div in your page it is possible something else is preventing it from filling available space. You can also add width/height of 100% and a position value of relative.

    [Blog] [twitter] [LinkedIn]

    Wednesday, May 23, 2018 9:17 PM