Skip to content

Instantly share code, notes, and snippets.

@csessig86
csessig86 / geojson.js
Created July 8, 2012 08:18 — forked from mourner/geojson.js
Leaflet GeoJSON API proposal
var geojson = L.geoJson(data, {
// style for all vector layers (color, opacity, etc.) (optional)
getStyle: function (feature) {
return feature.properties && feature.properties.style;
},
// function for creating layers for GeoJSON point features (optional)
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {