// 例 var gjo = L.geoJson(office, { pointToLayer: function(feature, latlng) { var marker, popup; switch (feature.properties.dep) { case "fire": return L.circleMarker(latlng, { color: "red"}).bindPopup("消防署"); break; case "police": return L.circleMarker(latlng, { color: "black"}).bindPopup("警察署"); break; } } }).addTo(mymap); mymap.fitBounds(gjo.getBounds());