문제

I am using Infoboxes to display info for markers on a GoogleMapv3. I would like to display multiple tabs within each marker, but haven't found any good examples on how to do this. My code to do the markers and InfoBoxes looks like this:

 //create a new marker for this coordinate
        var marker = new google.maps.Marker({
            title:title,
            content:html,
            map:map,
            draggable:false,
            position:pathCoordinates[i],
            icon: iconImg
        });

        //attach a 'click' listener to the marker and assign it a new InfoBox with related data
        google.maps.event.addListener(marker, 'click', function() {
            var infobox = new InfoBox({
                content: this.content,
                maxWidth: 150,
                pixelOffset: new google.maps.Size(-140, 0),
                zIndex: null,
                boxStyle: {
                    width: "280px"
                },
                closeBoxMargin: "8px 10px 2px 2px",
                infoBoxClearance: new google.maps.Size(1, 1)
            });
            infobox.open(map,this);
        });
도움이 되었습니까?

해결책

You might want to take a look at the InfoBubble library. For an examples see here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top