{"id":13426512,"url":"https://github.com/mapbox/leaflet-omnivore","last_synced_at":"2026-02-22T11:50:41.367Z","repository":{"id":13824210,"uuid":"16520801","full_name":"mapbox/leaflet-omnivore","owner":"mapbox","description":"universal format parser for Leaflet \u0026 Mapbox.js","archived":false,"fork":false,"pushed_at":"2021-09-15T19:10:07.000Z","size":644,"stargazers_count":676,"open_issues_count":27,"forks_count":128,"subscribers_count":143,"default_branch":"master","last_synced_at":"2026-01-24T06:21:07.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-gpx/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapbox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-04T18:16:32.000Z","updated_at":"2026-01-23T15:19:07.000Z","dependencies_parsed_at":"2022-07-12T15:13:11.219Z","dependency_job_id":null,"html_url":"https://github.com/mapbox/leaflet-omnivore","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mapbox/leaflet-omnivore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fleaflet-omnivore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fleaflet-omnivore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fleaflet-omnivore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fleaflet-omnivore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapbox","download_url":"https://codeload.github.com/mapbox/leaflet-omnivore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fleaflet-omnivore/sbom","scorecard":{"id":616482,"data":{"date":"2025-08-11","repo":{"name":"github.com/mapbox/leaflet-omnivore","commit":"102f5555a57dfbf83c12cb6a35e24e14cef336a4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":2,"reason":"Found 6/25 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/mapbox/.github/SECURITY.md:1","Info: Found linked content: github.com/mapbox/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/mapbox/.github/SECURITY.md:1","Info: Found text in security policy: github.com/mapbox/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T04:08:55.080Z","repository_id":13824210,"created_at":"2025-08-21T04:08:55.081Z","updated_at":"2025-08-21T04:08:55.081Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29711373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T10:34:24.778Z","status":"ssl_error","status_checked_at":"2026-02-22T10:32:23.200Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T00:01:36.674Z","updated_at":"2026-02-22T11:50:41.322Z","avatar_url":"https://github.com/mapbox.png","language":"JavaScript","readme":"# leaflet-omnivore\n\n![](https://farm8.staticflickr.com/7373/12376158164_e335b4e61d_b.jpg)\n\n[Leaflet](http://leafletjs.com/) supports the [GeoJSON](http://geojson.org/) format\nby default. What if you have something else? That's where omnivore comes in.\n\nIt currently supports:\n\n* [CSV](http://en.wikipedia.org/wiki/Comma-separated_values) (via [csv2geojson](https://github.com/mapbox/csv2geojson))\n* GPX (via [toGeoJSON](https://github.com/mapbox/togeojson))\n* [KML](http://developers.google.com/kml/documentation/) (via [toGeoJSON](https://github.com/mapbox/togeojson))\n* [WKT](http://en.wikipedia.org/wiki/Well-known_text) (via [wellknown](https://github.com/mapbox/wellknown))\n* [TopoJSON](https://github.com/mbostock/topojson)\n* [Encoded Polylines](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) via [polyline](https://github.com/mapbox/polyline)\n\nOmnivore also includes an AJAX library, [corslite](https://github.com/mapbox/corslite),\nso you can specify what you want to add to the map with just a URL.\n\n## Installation\n\nuse it easily with the [Mapbox Plugins CDN](http://mapbox.com/mapbox.js/plugins/#leaflet-omnivore):\n\n```html\n\u003cscript src='//api.tiles.mapbox.com/mapbox.js/plugins/leaflet-omnivore/v0.3.1/leaflet-omnivore.min.js'\u003e\u003c/script\u003e\n```\n\n\nOr download `leaflet-omnivore.min.js` from this repository.\n\n## example\n\nLive examples:\n\n* [WKT](https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-wkt/)\n* [TopoJSON](https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-topojson/)\n* [Tooltips](https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-kml-tooltip/)\n* [KML](https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-kml/)\n* [GPX](https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-gpx/)\n* [Icons](https://www.mapbox.com/mapbox.js/example/v1.0.0/markers-from-csv-custom-style/)\n* [CSV](https://www.mapbox.com/mapbox.js/example/v1.0.0/markers-from-csv/)\n\n```js\nvar map = L.mapbox.map('map', 'mapbox.streets')\n    .setView([38, -102.0], 5);\n\nomnivore.csv('a.csv').addTo(map);\nomnivore.gpx('a.gpx').addTo(map);\nomnivore.kml('a.kml').addTo(map);\nomnivore.wkt('a.wkt').addTo(map);\nomnivore.topojson('a.topojson').addTo(map);\nomnivore.geojson('a.geojson').addTo(map);\nomnivore.polyline('a.txt').addTo(map);\n```\n\n## API\n\nArguments with `?` are optional. **parser_options** consists of options\nsent to the parser library, _not_ to the layer: if you want to provide options\nto the layer, see the example in the Custom Layers section.\n\nBy default, the library will construct a `L.geoJson()` layer internally and\ncall `.addData(geojson)` on it in order to load it full of GeoJSON. If you want\nto use a different kind of layer, like a `L.mapbox.featureLayer()`, you can,\nby passing it as `customLayer`, as long as it supports events and `addData()`.\nYou can also use this API to pass custom options to a `L.geoJson()` instance.:\n\n\n* `.csv(url, parser_options?, customLayer?)`: Load \u0026 parse CSV, and return layer. Options are the same as [csv2geojson](https://github.com/mapbox/csv2geojson#api): `latfield, lonfield, delimiter`\n* `.csv.parse(csvString, parser_options?)`: Parse CSV, and return layer.\n* `.kml(url)`: Load \u0026 parse KML, and return layer.\n* `.kml.parse(kmlString | gpxDom)`: Parse KML from a string of XML or XML DOM, and return layer.\n* `.gpx(url, parser_options?, customLayer?)`: Load \u0026 parse GPX, and return layer.\n* `.gpx.parse(gpxString | gpxDom)`: Parse GPX from a string of XML or XML DOM, and return layer.\n* `.geojson(url, parser_options?, customLayer?)`: Load GeoJSON file at URL, parse GeoJSON, and return layer.\n* `.wkt(url, parser_options?, customLayer?)`: Load \u0026 parse WKT, and return layer.\n* `.wkt.parse(wktString)`: Parse WKT, and return layer.\n* `.topojson(url, parser_options?, customLayer?)`: Load \u0026 parse TopoJSON, and return layer.\n* `.topojson.parse(topojson)`: Parse TopoJSON (given as a string or object), and return layer.\n* `.polyline(url, parser_options?, customLayer?)`: Load \u0026 parse polyline, and return layer.\n* `.polyline.parse(txt, options, layer)`: Parse polyline (given as a string or object), and return layer.\n\nValid options:\n\n#### polyline\n\n* `precision` will change how the polyline is interpreted. By default, the value\n  is 5. This is the [factor in the algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm),\n  by default 1e5, which is adjustable.\n\n### Custom Layers\n\nPassing custom options:\n\n```js\nvar customLayer = L.geoJson(null, {\n    filter: function() {\n        // my custom filter function\n        return true;\n    }\n});\n\nvar myLayer = omnivore.csv('foo', null, customLayer);\n```\n\nAdding custom styles to a GeoJSON layer:\n\n```js\nvar customLayer = L.geoJson(null, {\n    // http://leafletjs.com/reference.html#geojson-style\n    style: function(feature) {\n        return { color: '#f00' };\n    }\n});\n// this can be any kind of omnivore layer\nvar runLayer = omnivore.kml('line.kml', null, customLayer)\n```\n\nUsing a `L.mapbox.featureLayer`:\n\n```js\nvar layer = omnivore.gpx('a.gpx', null, L.mapbox.featureLayer());\n```\n\n### Async \u0026 Events\n\nEach function returns an `L.geoJson` object. Functions that load from URLs\nare **asynchronous**, so they will **not** immediately expose accurate `.setGeoJSON()` functions.\n\nFor this reason, we fire events:\n\n* `ready`: fired when all data is loaded into the layer\n* `error`: fired if data can't be loaded or parsed\n\n```js\nvar layer = omnivore.gpx('a.gpx')\n    .on('ready', function() {\n        // when this is fired, the layer\n        // is done being initialized\n    })\n    .on('error', function() {\n        // fired if the layer can't be loaded over AJAX\n        // or can't be parsed\n    })\n    .addTo(map);\n```\n\n`ready` does **not** fire if you don't use an asynchronous form of the function\nlike `.topojson.parse()`: because you don't need an event. Just run your code\nafter the call.\n\n## Development\n\nThis is a [browserify](http://browserify.org/) project:\n\n```sh\ngit clone git@github.com:mapbox/leaflet-omnivore.git\n\ncd leaflet-omnivore\n\n# to run tests\nnpm install\n\n# to build leaflet-omnivore.js\nnpm run prepublish\n```\n\n`leaflet-omnivore.js` and `leaflet-omnivore.min.js` are **built files** generated\nfrom `index.js` by `browserify`. If you find an issue, it either needs to be\nfixed in `index.js`, or in one of the libraries leaflet-omnivore uses\nto parse formats.\n\n## FAQ\n\n* **What if I just want one format?** Lucky for you, each format is specified\n  in a different module, so you can just use [TopoJSON](https://github.com/mbostock/topojson),\n  [csv2geojson](https://github.com/mapbox/csv2geojson), [wellknown](https://github.com/mapbox/wellknown), or\n  [toGeoJSON](https://github.com/mapbox/togeojson)\n  individually.\n* **My AJAX request is failing for a cross-domain request**. Read up on the [Same Origin Restriction](http://en.wikipedia.org/wiki/Same-origin_policy).\n  By default, we use corslite, so cross-domain requests will try to use [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n  if your server and browser supports it, but if one of them doesn't, there's no\n  way on the internet to support your request.\n* **Why isn't JSONP supported?** [Here's why](https://gist.github.com/tmcw/6244497).\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fleaflet-omnivore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapbox%2Fleaflet-omnivore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fleaflet-omnivore/lists"}