{"id":19715439,"url":"https://github.com/maliut/react-leaflet-react-pixi","last_synced_at":"2026-03-07T13:32:42.281Z","repository":{"id":181615841,"uuid":"428155597","full_name":"maliut/react-leaflet-react-pixi","owner":"maliut","description":"Write Leaflet and PixiJS applications using React declarative style.","archived":false,"fork":false,"pushed_at":"2021-11-21T15:55:40.000Z","size":5053,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T20:39:40.196Z","etag":null,"topics":["leaflet","leaflet-overlay","pixi","pixijs","react","react-leaflet","react-pixi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maliut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-15T07:00:04.000Z","updated_at":"2025-04-02T06:55:21.000Z","dependencies_parsed_at":"2023-07-16T14:46:22.884Z","dependency_job_id":null,"html_url":"https://github.com/maliut/react-leaflet-react-pixi","commit_stats":null,"previous_names":["maliut/react-leaflet-react-pixi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maliut/react-leaflet-react-pixi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliut%2Freact-leaflet-react-pixi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliut%2Freact-leaflet-react-pixi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliut%2Freact-leaflet-react-pixi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliut%2Freact-leaflet-react-pixi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maliut","download_url":"https://codeload.github.com/maliut/react-leaflet-react-pixi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliut%2Freact-leaflet-react-pixi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30215679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T13:25:55.541Z","status":"ssl_error","status_checked_at":"2026-03-07T13:25:38.596Z","response_time":53,"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":["leaflet","leaflet-overlay","pixi","pixijs","react","react-leaflet","react-pixi"],"created_at":"2024-11-11T22:38:24.602Z","updated_at":"2026-03-07T13:32:42.245Z","avatar_url":"https://github.com/maliut.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Leaflet + React Pixi\n\nWrite Leaflet and PixiJS applications using React declarative style.\n\nDemo usage:\n\n```javascript\nfunction App() {\n  return (\n    \u003cMapContainer center={[51.505, -0.09]} zoom={13} style={{width: '100vw', height: '100vh'}}\u003e\n      \u003cTileLayer\n        attribution='\u0026copy; \u003ca href=\"http://osm.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors'\n        url=\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\"\n      /\u003e\n      \u003cPixiRoot\u003e\n        \u003cMyContent /\u003e\n      \u003c/PixiRoot\u003e\n    \u003c/MapContainer\u003e\n  )\n}\n\nfunction MyContent() {\n  const [containerX, containerY] = useProject([51.5, -0.09])\n  const [markerOffset, setMarkerOffset] = useState(0)\n  const [markerX, markerY] = useProject([51.5, -0.09 + markerOffset], [containerX, containerY])\n  const scale = useScale()\n\n  const [direction, setDirection] = useState(1)\n  useTick(delta =\u003e {\n    setMarkerOffset(val =\u003e val + delta * direction / 3000)\n    if (markerOffset \u003e 0.05) {\n      setDirection(-1)\n    } else if (markerOffset \u003c -0.05) {\n      setDirection(1)\n    }\n  })\n\n  return (\n    \u003cContainer x={containerX} y={containerY}\u003e\n      \u003cSprite x={markerX} y={markerY} anchor={0.5} scale={1 / scale} image=\"https://s3-us-west-2.amazonaws.com/s.cdpn.io/693612/IaUrttj.png\" /\u003e\n    \u003c/Container\u003e\n  )\n}\n```\n\n![Demo Gif](./public/demo.gif)\n\n---\n\nThe work is based on [React Leaflet](https://react-leaflet.js.org/), [React Pixi](https://reactpixi.org/) and [Leaflet.PixiOverlay](https://github.com/manubb/Leaflet.PixiOverlay). This project is to combine them all together, provide a natural declarative code style, and fully encapsulate Leaflet.PixiOverlay inside.\n\nThe code is quite simple. You just need to copy `PixiRoot.js` and `hooks.js` in your project. Feel free to modify them as your need.(and don't forget to leave a ⭐star : )\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaliut%2Freact-leaflet-react-pixi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaliut%2Freact-leaflet-react-pixi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaliut%2Freact-leaflet-react-pixi/lists"}