Custom markers for points from a geoJson file with Google Maps

前端 未结 1 1366
庸人自扰
庸人自扰 2021-02-02 11:55

I\'m using GeoJSON as a data source for Google Maps. I\'m using v3 of the API to create a data layer as follows:



        
1条回答
  •  清酒与你
    2021-02-02 12:20

    Use a styling-function(styling-functions enable you to apply styles based on a specific feature)

      map.data.setStyle(function(feature) {
        return {icon:feature.getProperty('icon')};
      });
    

    0 讨论(0)
提交回复
热议问题