Hoppa till huvudinnehållet

How to set a Map Background Color with HTML5?

Kommentarer

3 kommentarer

  • Permanently deleted user

    Thanks, Jordan!

    I'm not using the installed template but deploy the HTML5 viewer manually to Inetpub.

    Well, that did change the background but also covers up the ZoomIn, ZoomOut, and My Location buttons on the HTML5 Handheld viewer.  On the tablet and desktop (index.html) it pushes those UI buttons down into a different region altogether so that the map is on top with no controls and the ZoomIn and ZoomOut are below the map window in their own secton of the screen.

    As I'm primarily working on the Handheld.html, I tried to add a 'z-index' field to what you had above but that does not solve the problem:

    .map {

                background-color: #A5BFDD;

                z-index: 0;

    }

      I think the handheld is probably doing the same thing as the other two where these controls are now in a seperate section of the screen:

    (/customer/servlet/servlet.FileDownload?file=00P6000000e88UYEAY) /customer/servlet/servlet.FileDownload?file=00P6000000e88UYEAY

    0
  • Permanently deleted user

    Well, that's unexpected. I haven't been able to reproduce that behaviour so I'm at a bit of a loss. Which version of the viewer are you running? Which browser are you using? Does this happen in other browsers? Have there been any other changes made to the viewer layout or styling?

    0
  • Permanently deleted user
    Hi all,

     

    I was able to reproduce the same behaviour where the controls get bumped down below the map.  Saying this, I was able to find a solution that seemed to work for me.  In the same "Mapping/modules/Map/CSS/common.css" section that Jordan suggested, I added the background-color parameter to the .MapView section:

     

    .MapView {

     

        height: 100%;

     

        background-color: #000000;

     

    }

     

    This seemed to work as expected.
    0

Du måste logga in om du vill lämna en kommentar.