【问题标题】:Display multiple markers with Google maps API v3使用 Google maps API v3 显示多个标记
【发布时间】:2015-03-20 14:43:45
【问题描述】:

我的 Google 地图上显示的标记不能超过 10 个。我的坐标保存在 csv 文件中,并且低于 10 个标记,所有标记都显示在我的地图中。 API 使用限制吗? 感谢您的帮助。

【问题讨论】:

标签: javascript c# google-maps


【解决方案1】:

这是我的代码:我必须添加大约 50 个标记

csTextMarkers.Append("var infowindow = new google.maps.InfoWindow();");
csTextMarkers.Append("var marker = new google.maps.Marker({ position: new google.maps.LatLng(");
csTextMarkers.AppendFormat("{0}, {1}", geo.Latitude.Replace(',', '.'), geo.Longitude.Replace(',', '.'));
csTextMarkers.Append("), map: map, ");
//Filtre "N/D"
if (geo.Dimension_Ent == "null")
{
    csTextMarkers.Append("icon: 'http://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=%7c9E7151%7c000000&.png%3f', ");
}
//Filtre "< 500 K"
else if (geo.Dimension_Ent == "500 K")
{
    csTextMarkers.Append("icon: 'http://maps.google.com/mapfiles/ms/icons/purple-dot.png' ");
}
csTextMarkers.Append("});");
csTextMarkers.Append("google.maps.event.addListener(marker, 'click', function() {infowindow.setContent(\"" + "Nom : " + geo.Nom + "<br/> Adresse : " + geo.Adresse1 + " " + geo.Code_Postal + " " + geo.Ville + "<br/> Dimension entreprise : " + geo.Dimension_Ent + "\"); infowindow.open(map,this);});");

【讨论】:

    猜你喜欢
    • 2012-04-12
    • 2018-03-21
    • 1970-01-01
    • 2012-08-27
    • 1970-01-01
    • 2011-08-13
    • 1970-01-01
    • 2014-02-13
    • 1970-01-01
    相关资源
    最近更新 更多