{"id":13832169,"url":"https://github.com/onaci/leaflet-velocity","last_synced_at":"2026-02-09T14:38:00.765Z","repository":{"id":40301438,"uuid":"81030653","full_name":"onaci/leaflet-velocity","owner":"onaci","description":"Visualise velocity data on a leaflet layer","archived":false,"fork":false,"pushed_at":"2023-10-19T17:29:10.000Z","size":6100,"stargazers_count":596,"open_issues_count":24,"forks_count":213,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-11-19T21:09:00.976Z","etag":null,"topics":["current","leaflet","ocean","velocity","visualisation","visualization","water","weather","wind"],"latest_commit_sha":null,"homepage":"https://onaci.github.io/leaflet-velocity/","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/onaci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-05T23:47:04.000Z","updated_at":"2024-11-11T04:04:05.000Z","dependencies_parsed_at":"2023-02-01T20:00:47.640Z","dependency_job_id":"569ffac8-70d7-4a95-802e-9f98f3954d1a","html_url":"https://github.com/onaci/leaflet-velocity","commit_stats":{"total_commits":108,"total_committers":10,"mean_commits":10.8,"dds":"0.34259259259259256","last_synced_commit":"b826c676d58dad3f9ea24a437f195b52f3a6742f"},"previous_names":["danwild/leaflet-velocity"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaci%2Fleaflet-velocity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaci%2Fleaflet-velocity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaci%2Fleaflet-velocity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaci%2Fleaflet-velocity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onaci","download_url":"https://codeload.github.com/onaci/leaflet-velocity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225488076,"owners_count":17482212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["current","leaflet","ocean","velocity","visualisation","visualization","water","weather","wind"],"created_at":"2024-08-04T10:01:53.542Z","updated_at":"2026-02-09T14:37:55.746Z","avatar_url":"https://github.com/onaci.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Hydrosphere"],"sub_categories":["Waves and Currents"],"readme":"# leaflet-velocity [![NPM version][npm-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url]\n\n## Version 2 Notice\n\nAs of version 2, `leaflet-velocity` is now under [CSIRO](https://www.csiro.au)'s [Open Source Software Licence Agreement](LICENSE.md), which is variation of the BSD / MIT License.\n\nThere are no other plans for changes to licensing, and the project will remain open source.\n\n---\n\nA plugin for Leaflet (v1.0.3, and v0.7.7) to create a canvas visualisation layer for direction and intensity of arbitrary velocities (e.g. wind, ocean current).\n\nLive Demo: https://onaci.github.io/leaflet-velocity/\n\n- Uses a modified version of [WindJS](https://github.com/Esri/wind-js) for core functionality.\n- Similar to [wind-js-leaflet](https://github.com/danwild/wind-js-leaflet), however much more versatile (provides a generic leaflet layer, and not restricted to wind).\n- Data input format is the same as output by [wind-js-server](https://github.com/danwild/wind-js-server), using [grib2json](https://github.com/cambecc/grib2json).\n\n![Screenshot](/screenshots/velocity.gif?raw=true)\n\n## Example use:\n\n```javascript\nvar velocityLayer = L.velocityLayer({\n  displayValues: true,\n  displayOptions: {\n    // label prefix\n    velocityType: \"Global Wind\",\n\n    // leaflet control position\n    position: \"bottomleft\",\n\n    // no data at cursor\n    emptyString: \"No velocity data\",\n\n    // see explanation below\n    angleConvention: \"bearingCW\",\n\n    // display cardinal direction alongside degrees\n    showCardinal: false,\n\n    // one of: ['ms', 'k/h', 'mph', 'kt']\n    speedUnit: \"ms\",\n\n    // direction label prefix\n    directionString: \"Direction\",\n\n    // speed label prefix\n    speedString: \"Speed\",\n  },\n  data: data, // see demo/*.json, or wind-js-server for example data service\n\n  // OPTIONAL\n  minVelocity: 0, // used to align color scale\n  maxVelocity: 10, // used to align color scale\n  velocityScale: 0.005, // modifier for particle animations, arbitrarily defaults to 0.005\n  colorScale: [], // define your own array of hex/rgb colors\n  onAdd: null, // callback function\n  onRemove: null, // callback function\n  opacity: 0.97, // layer opacity, default 0.97\n\n  // optional pane to add the layer, will be created if doesn't exist\n  // leaflet v1+ only (falls back to overlayPane for \u003c v1)\n  paneName: \"overlayPane\",\n});\n```\n\nThe angle convention option refers to the convention used to express the wind direction as an angle from north direction in the control.\nIt can be any combination of `bearing` (angle toward which the flow goes) or `meteo` (angle from which the flow comes),\nand `CW` (angle value increases clock-wise) or `CCW` (angle value increases counter clock-wise). If not given defaults to `bearingCCW`.\n\nThe speed unit option refers to the unit used to express the wind speed in the control.\nIt can be `m/s` for meter per second, `k/h` for kilometer per hour or `kt` for knots. If not given defaults to `m/s`.\n\n## Public methods\n\n| method       | params     | description                       |\n| ------------ | ---------- | --------------------------------- |\n| `setData`    | `{Object}` | update the layer with new data    |\n| `setOptions` | `{Object}` | update the layer with new options |\n\n## Build / watch\n\n```shell\nnpm run watch\n```\n\n## Reference\n\n`leaflet-velocity` is possible because of things like:\n\n- [L.CanvasOverlay.js](https://gist.github.com/Sumbera/11114288)\n- [WindJS](https://github.com/Esri/wind-js)\n- [earth](https://github.com/cambecc/earth)\n\n## Example data\n\nData shown for the Great Barrier Reef has been derived from [CSIRO's eReefs products](https://research.csiro.au/ereefs/)\n\n## License\n\nCSIRO Open Source Software Licence Agreement (variation of the BSD / MIT License)\n\n[npm-image]: https://badge.fury.io/js/leaflet-velocity.svg\n[npm-url]: https://www.npmjs.com/package/leaflet-velocity\n[npm-downloads-image]: https://img.shields.io/npm/dt/leaflet-velocity.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonaci%2Fleaflet-velocity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonaci%2Fleaflet-velocity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonaci%2Fleaflet-velocity/lists"}