google map infobox position

前端 未结 3 2044
北荒
北荒 2021-01-12 02:18

I\'ve been googling that question for some time and all I got is headache. I add google marker with infobox on my google map, but the infobox is located lower than marker, h

3条回答
  •  一整个雨季
    2021-01-12 02:53

    infobox = new InfoBox({
             content: document.getElementById("infobox"),
             disableAutoPan: false,
             maxWidth: 150,
             pixelOffset: new google.maps.Size(-140, -45),
             zIndex: null,
             boxStyle: {
                background: "url('http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/examples/tipbox.gif') 0% 100% no-repeat",
                opacity: 0.75,
                width: "280px"
            },
            infoBoxClearance: new google.maps.Size(1, 1),
            alignBottom: true
        });
    
    
    #infobox {
        border:2px solid black;
        margin-bottom: 8px;
        background:#333;
        color:#FFF;
        font-family:Arial, Helvetica, sans-serif;
        font-size:12px;
        padding: .5em 1em;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
        border-radius: 2px;
        text-shadow:0 -1px #000000;
        -webkit-box-shadow: 0 0  8px #000;
        box-shadow: 0 0 8px #000;
    }
    

    // Load the customized arrow from local

提交回复
热议问题