Adding multiple markers in ionic google map

前端 未结 2 1566
借酒劲吻你
借酒劲吻你 2021-01-25 20:57

I am trying to integrate google map in ionic project and got succeeded in displaying the google map on ionic page. But i want to display multiple markers on the this google map.

2条回答
  •  春和景丽
    2021-01-25 21:12

    you can define some markers like this:

    new google.maps.Marker({
      map: map,
      position: {lat: -34.397, lng: 150.644},
      icon: {
        url: "http://maps.google.com/mapfiles/ms/icons/blue-dot.png"
      }
    });
    

    for more information see the tutorial here: https://medium.com/free-code-camp/how-to-change-javascript-google-map-marker-color-8a72131d1207

提交回复
热议问题