{"id":18909843,"url":"https://github.com/map-ir/mapir-react-component","last_synced_at":"2025-04-15T06:30:47.910Z","repository":{"id":34858639,"uuid":"184994603","full_name":"map-ir/mapir-react-component","owner":"map-ir","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-06T11:21:07.000Z","size":2695,"stargazers_count":14,"open_issues_count":28,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T17:06:42.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/map-ir.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-05T07:19:39.000Z","updated_at":"2024-01-04T07:02:28.000Z","dependencies_parsed_at":"2024-06-19T17:37:25.485Z","dependency_job_id":"50f6f1cd-9e32-46ef-a05a-819c910e63ee","html_url":"https://github.com/map-ir/mapir-react-component","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/map-ir%2Fmapir-react-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/map-ir%2Fmapir-react-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/map-ir%2Fmapir-react-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/map-ir%2Fmapir-react-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/map-ir","download_url":"https://codeload.github.com/map-ir/mapir-react-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248384129,"owners_count":21094674,"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":[],"created_at":"2024-11-08T09:35:24.011Z","updated_at":"2025-04-15T06:30:42.894Z","avatar_url":"https://github.com/map-ir.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MapirReactComponent\r\n\r\n[![npm version](https://badge.fury.io/js/mapir-react-component.svg)](https://www.npmjs.com/package/mapir-react-component)\r\n\r\n![Map.ir](https://map.ir/css/images/mapir-logo.png) React wrapper for mapbox-gl-js. Expose a bunch of component meant to be simple to use for React.\r\n\r\n## Get API Key\r\n\r\n🔑 You should first get api key from [Map.ir](https://corp.map.ir/registration/)\r\n\r\n## Installation\r\n\r\n```\r\nnpm i mapir-react-component\r\n```\r\n\r\n## Quick start\r\n\r\n### Import module\r\n\r\n```jsx\r\nimport Mapir from 'mapir-react-component';\r\nimport 'mapir-react-component/dist/index.css';\r\n```\r\n\r\n### Set API Key\r\n\r\n```jsx\r\nconst Map = Mapir.setToken({\r\n  transformRequest: (url) =\u003e {\r\n    return {\r\n      url: url,\r\n      headers: {\r\n        'x-api-key': 'Your_API_KEY', //Mapir api key\r\n        'Mapir-SDK': 'reactjs',\r\n      },\r\n    };\r\n  },\r\n});\r\n```\r\n\r\n### Generate Component\r\n\r\n```jsx\r\nrender () {\r\n\treturn (\r\n\t\t\u003cMapir\r\n\t\tMap={Map}\r\n\t\tapiKey={'Your_API_KEY'}\r\n\t\t/\u003e\r\n\t)\r\n}\r\n```\r\n\r\n[![Edit mapir-react](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/objective-ganguly-st4od?fontsize=14)\r\n\r\n[![Edit stackblitz](./assets/stackblitz.png)](https://react-fgwfsq.stackblitz.io)\r\n\r\n📖 [English Documentation](https://github.com/map-ir/mapir-react-component/wiki/Documentation)\r\n\r\n📖 [Persian Documentation](https://support.map.ir/developers/components/reactjs/)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmap-ir%2Fmapir-react-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmap-ir%2Fmapir-react-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmap-ir%2Fmapir-react-component/lists"}