{"id":20461362,"url":"https://github.com/antvis/l7-customlayer-template","last_synced_at":"2025-10-03T21:49:26.268Z","repository":{"id":55005935,"uuid":"522477293","full_name":"antvis/L7-CustomLayer-Template","owner":"antvis","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-27T03:33:32.000Z","size":82,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-09-15T18:39:06.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antvis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-08T09:05:54.000Z","updated_at":"2023-04-10T06:36:16.000Z","dependencies_parsed_at":"2022-08-14T08:50:39.605Z","dependency_job_id":null,"html_url":"https://github.com/antvis/L7-CustomLayer-Template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antvis/L7-CustomLayer-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antvis%2FL7-CustomLayer-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antvis%2FL7-CustomLayer-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antvis%2FL7-CustomLayer-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antvis%2FL7-CustomLayer-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antvis","download_url":"https://codeload.github.com/antvis/L7-CustomLayer-Template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antvis%2FL7-CustomLayer-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278234030,"owners_count":25953074,"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","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-15T12:25:04.779Z","updated_at":"2025-10-03T21:49:25.981Z","avatar_url":"https://github.com/antvis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# L7-CustomLayer-Template\n\n- 详细文档 https://github.com/antvis/L7-CustomLayer-Template/tree/master/docs/template%20api\n\n## Usage\n\n在引入图层后和 L7 普通的图层使用保持一致\n\n```js\nimport { Scene } from '@antv/l7';\nimport { GaodeMap } from '@antv/l7-maps';\nimport React, { useEffect } from 'react';\nimport { CustomPointLayer } from 'l7-customlayer-template';\n\nexport default () =\u003e {\n  useEffect(() =\u003e {\n    const scene = new Scene({\n      id: 'map',\n      map: new GaodeMap({\n        style: 'light',\n        center: [120, 30],\n        zoom: 6.45,\n      }),\n    });\n\n    const layer = new CustomPointLayer()\n      .source([{ lng: 120, lat: 30 }], {\n        parser: {\n          type: 'json',\n          x: 'lng',\n          y: 'lat',\n        },\n      })\n      .shape('circle')\n      .size(20)\n      .color('#f00')\n      .active(true);\n    scene.on('loaded', () =\u003e {\n      scene.addLayer(layer);\n      layer.on('click', () =\u003e {\n        alert('click');\n      });\n    });\n  }, []);\n  return (\n    \u003cdiv\n      id=\"map\"\n      style={{\n        height: '500px',\n        position: 'relative',\n      }}\n    /\u003e\n  );\n};\n```\n\n## Getting Started\n\nInstall dependencies,\n\n```bash\n$ npm i\n```\n\nStart the dev server,\n\n```bash\n$ npm start\n```\n\nBuild documentation,\n\n```bash\n$ npm run docs:build\n```\n\nRun test,\n\n```bash\n$ npm test\n```\n\nBuild library via `father`,\n\n```bash\n$ npm run build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantvis%2Fl7-customlayer-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantvis%2Fl7-customlayer-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantvis%2Fl7-customlayer-template/lists"}