{"id":18348682,"url":"https://github.com/paraboly/pwc-map-legend","last_synced_at":"2025-04-06T09:31:43.714Z","repository":{"id":57135121,"uuid":"213752295","full_name":"Paraboly/pwc-map-legend","owner":"Paraboly","description":"Fully customizable map legend view for Web with StencilJS via Paraboly","archived":false,"fork":false,"pushed_at":"2020-11-25T13:38:37.000Z","size":464,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T09:26:50.717Z","etag":null,"topics":["pwc-map-legend","web-component"],"latest_commit_sha":null,"homepage":"https://paraboly.com","language":"TypeScript","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/Paraboly.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}},"created_at":"2019-10-08T20:54:59.000Z","updated_at":"2020-11-25T13:38:40.000Z","dependencies_parsed_at":"2022-09-04T07:30:21.206Z","dependency_job_id":null,"html_url":"https://github.com/Paraboly/pwc-map-legend","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Fpwc-map-legend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Fpwc-map-legend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Fpwc-map-legend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Fpwc-map-legend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paraboly","download_url":"https://codeload.github.com/Paraboly/pwc-map-legend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463744,"owners_count":20942935,"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":["pwc-map-legend","web-component"],"created_at":"2024-11-05T21:18:48.592Z","updated_at":"2025-04-06T09:31:43.415Z","avatar_url":"https://github.com/Paraboly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D\u0026colorA=16161d\u0026style=for-the-badge)\n\n\u003cimg alt=\"WebComponent Map Legend\" src=\"assets/logo.png\" width=\"1050\"/\u003e\n\n[![Fully customizable map legend view for Web with StencilJS via Paraboly](https://img.shields.io/badge/-Fully%20customizable%20map%20legend%20view%20for%20Web%20with%20StencilJS%20via%20Paraboly-lightgrey?style=for-the-badge)](https://github.com/Paraboly/pwc-map-legend)\n\n[![npm version](https://img.shields.io/npm/v/@paraboly/pwc-map-legend.svg?style=for-the-badge)](https://www.npmjs.com/package/@paraboly/pwc-map-legend)\n[![npm](https://img.shields.io/npm/dt/@paraboly/pwc-map-legend.svg?style=for-the-badge)](https://www.npmjs.com/package/@paraboly/pwc-map-legend)\n![Platform - Platform Free Web](https://img.shields.io/badge/-Web%20%7C%20Platform%20Free-blue?style=for-the-badge)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"WebComponent Map Legend\" src=\"assets/example.png\" /\u003e\n  \u003cimg alt=\"WebComponent Map Legend\" src=\"assets/example2.png\" /\u003e\n  \u003cimg alt=\"WebComponent Map Legend\" src=\"assets/example3.png\" /\u003e\n  \u003cimg alt=\"Example with Road Lanes and Overlay Text\" src=\"assets/example-lanes-overlay-text.png\" /\u003e\n\u003c/p\u003e\n\n## [Live JSFiddle Example](https://jsfiddle.net/starikcetin/y7j28rvs/18/)\n\n## Installation\n\n### Script tag\n\n- [Publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages)\n- Put a script tag similar to this `\u003cscript type=\"module\" src=\"https://unpkg.com/@paraboly/pwc-map-legend@latest/dist/pwc-map-legend/pwc-map-legend.esm.js\"\u003e\u003c/script\u003e` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### In a stencil-starter app\n\n- Run `npm install @paraboly/pwc-map-legend --save`\n- Add an import to the npm packages `import @paraboly/pwc-map-legend;`\n- Then you can use the element anywhere in your template, JSX, html etc\n\n# Usage\n\n## HTML Tag Prop Way\n\n```html\n\u003cpwc-map-legend\n  title-text=\"Custom Legend Title\"\n  entries='[\n    {\n      \"name\": \"Foo\",\n      \"count\": 1512,\n      \"color\": \"red\"\n    },\n    {\n      \"name\": \"Road\",\n      \"count\": 8,\n      \"color\": \"#222123\",\n      \"svgStyle\": { \"stroke-opacity\": 0.8, \"stroke-width\": 15 },\n      \"roadLines\": [\n        {\n          \"color\": \"white\",\n          \"svgStyle\": { \"stroke-dasharray\": 6 }\n        },\n        {\n          \"color\": \"white\"\n        }\n      ]\n    }\n  ]'\n\u003e\u003c/pwc-map-legend\u003e\n```\n\n## Javascript Way\n\n```html\n\u003cpwc-map-legend\u003e\u003c/pwc-map-legend\u003e\n```\n\n```js\nvar pwcMapLegend = document.querySelector(\"pwc-map-legend\");\npwcMapLegend.titleText = \"Legend\";\npwcMapLegend.entries = [\n  {\n    name: \"Foo\",\n    count: 1512,\n    color: \"red\"\n  },\n  {\n    name: \"Triple Lane Road\",\n    count: 8,\n    color: \"#222123\",\n    svgStyle: { \"stroke-opacity\": 0.8, \"stroke-width\": 15 },\n    roadLines: [\n      {\n        color: \"white\",\n        svgStyle: { \"stroke-dasharray\": 6 }\n      },\n      {\n        color: \"white\"\n      }\n    ]\n  }\n];\n```\n\n## Caveats\n\n* `stroke-width` of `svgStyle` overrides has to be of type `number` only. This is enforced in TypeScript interfaces, but there is no type enforcement when used from JavaScript code or from plain HTML.\n\n## Authors\n\n* SchemeSonic, haldun.yildiz@paraboly.com | haldun313@gmail.com\n\n* FreakyCoder, kuray.ogun@paraboly.com | kurayogun@gmail.com\n\n* starikcetin, tarik.cetin@paraboly.com | cetinsamedtarik@gmail.com\n\n## License\n\nWebComponent PWC Map Legend is available under the MIT license. Refer to the [LICENSE](/LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaboly%2Fpwc-map-legend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparaboly%2Fpwc-map-legend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaboly%2Fpwc-map-legend/lists"}