小编Shi*_* Ki的帖子

如何更改Google Maps infoWindow的位置

在此输入图像描述

正如标题所说,如何在上图中更改infoWindow的位置?

我按照Google的说明操作.现在我想改变infowindows的位置,但无法弄清楚要做什么.

function initialize() {
    var myLatlng = new google.maps.LatLng(-25.363882, 131.044922);
    var mapOptions = {
        zoom: 4,
        center: myLatlng
    };

    var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

    var contentString = '<div id="content">' +
        '<div id="siteNotice">' +
        '</div>' +
        '<h1 id="firstHeading" class="firstHeading">Uluru</h1>' +
        '<div id="bodyContent">' +
        '<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ' +
        'sandstone rock formation in the southern part of the ' +
        'Northern Territory, central Australia. It lies 335&#160;km (208&#160;mi) ' +
        'south west of …
Run Code Online (Sandbox Code Playgroud)

google-maps google-maps-api-3 google-maps-markers

11
推荐指数
1
解决办法
3万
查看次数