【问题标题】:adding another marker on google maps api在 google maps api 上添加另一个标记
【发布时间】:2016-01-14 13:02:20
【问题描述】:

我整天都在尝试简单地在我的谷歌地图上添加另一个标记,但总是失败。有人可以指点我这是如何完成的吗?

<script>
        $(document).ready(function() {
            $('.google-maps').gmap3({
                map:{
                    address: "PL1 3LF",
                    options:{
                        zoom: 14,
                        mapTypeId: google.maps.MapTypeId.ROADMAP,
                        mapTypeControl: false,
                        mapTypeControlOptions: {
                            style: google.maps.MapTypeControlStyle.DEFAULT
                        },
                        navigationControl: true,
                        scrollwheel: false,
                        streetViewControl: false
                    }
                },
                marker:{
                    address: "PL1 3LF"
                },marker:{
                    address: "PL1 3qq"
                }
            });
        });
    </script>

【问题讨论】:

    标签: javascript google-maps google-maps-api-3 marker jquery-gmap3


    【解决方案1】:

    尝试改变

    marker:{
      address: "PL1 3LF"
    },marker:{
      address: "PL1 3qq"
    }
    

    marker:{
        values:[
          {address:"PL1 3qq"},
          {address:"PL1 3LF"}
        ]
    }
    

    【讨论】:

      【解决方案2】:

      试试这个

      marker:{
          values:[
            {address:"PL1 3LF"},
            {address:PL1 3qq}
          ]
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-03-14
        • 2015-08-14
        • 2012-12-31
        • 2013-03-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多