{"id":14990435,"url":"https://github.com/arkadiuszwojcik/lit-google-map","last_synced_at":"2025-04-12T02:23:39.566Z","repository":{"id":40624497,"uuid":"237091391","full_name":"arkadiuszwojcik/lit-google-map","owner":"arkadiuszwojcik","description":"This project is port of google-map webcomponent based on LitElement library","archived":false,"fork":false,"pushed_at":"2024-09-24T10:48:27.000Z","size":101,"stargazers_count":8,"open_issues_count":2,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T02:23:17.385Z","etag":null,"topics":["google-maps","javascript","litelement","webcomponent"],"latest_commit_sha":null,"homepage":null,"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/arkadiuszwojcik.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":"2020-01-29T22:03:44.000Z","updated_at":"2024-02-15T11:23:34.000Z","dependencies_parsed_at":"2022-08-09T23:50:43.109Z","dependency_job_id":null,"html_url":"https://github.com/arkadiuszwojcik/lit-google-map","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/arkadiuszwojcik%2Flit-google-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiuszwojcik%2Flit-google-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiuszwojcik%2Flit-google-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiuszwojcik%2Flit-google-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arkadiuszwojcik","download_url":"https://codeload.github.com/arkadiuszwojcik/lit-google-map/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506147,"owners_count":21115388,"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":["google-maps","javascript","litelement","webcomponent"],"created_at":"2024-09-24T14:20:08.422Z","updated_at":"2025-04-12T02:23:39.539Z","avatar_url":"https://github.com/arkadiuszwojcik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lit-google-map\n\nThis project is port of [google-map](https://www.webcomponents.org/element/GoogleWebComponents/google-map) webcomponent based on [Lit v2](https://lit.dev/) library.\n\nUPDATE v1.0.0 (23/02/2022) \n-  Project ported to [Lit v2](https://lit.dev/)\n-  Added shapes: Circle and Polygon\n-  Bug fixes\n\n## Table of contents\n\n[How to use](#How-to-use)\n\n[Map element attributes](#Map-element-attributes)\n\n[Marker element attributes](#Marker-element-attributes)\n\n[Circle shape element attributes](#Circle-shape-element-attributes)\n\n[Polygon shape element attributes](#Polygon-shape-element-attributes)\n\n[How to build](#How-to-build)\n\n[License](#License)\n\n## How to use\n\nInclude lit-google-map bundle in HTML file:\n\n```html\n\u003cscript src=\"lit-google-map.bundle.js\"\u003e\u003c/script\u003e\n```\n\nor its minified version:\n\n```html\n\u003cscript src=\"lit-google-map.bundle.min.js\"\u003e\u003c/script\u003e\n```\n\nUse component in any place you want (remember to fill in Google Maps API key):\n\n```html\n\u003clit-google-map api-key=\"YOUR_GOOGLE_MAPS_API_KEY\"\u003e    \n\u003c/lit-google-map\u003e\n```\n\nYou can also include any number of map markers:\n\n```html\n\u003clit-google-map api-key=\"YOUR_GOOGLE_MAPS_API_KEY\"\u003e\n    \u003clit-google-map-marker slot=\"markers\" latitude=\"49.4404582\" longitude=\"20.2700361\"\u003e\n    \u003c/lit-google-map-marker\u003e  \n    \u003clit-google-map-marker slot=\"markers\" latitude=\"50.797444\" longitude=\"20.4600623\"\u003e\n    \u003c/lit-google-map-marker\u003e\n\u003c/lit-google-map\u003e\n```\n\nor/and shapes:\n\n```html\n\u003clit-google-map api-key=\"YOUR_GOOGLE_MAPS_API_KEY\"\u003e  \n    \u003clit-google-map-circle slot=\"shapes\" center-latitude=\"49.4404582\" center-longitude=\"20.2700361\"\u003e\n    \u003c/lit-google-map-circle\u003e\n\u003c/lit-google-map\u003e\n```\n\n## Map element attributes\n\n* '*api-key*' - Google map API key\n* '*language*' - Google map language (optional)\n* '*map-id*' - Google map mapId (optional)\n* '*version*' - Google map js script version to load (default: '3.48')\n* '*styles*' - Map styles in json format (optional)\n* '*zoom*' - Zoom level (default: '8')\n* '*fit-to-markers*' - Fit map area to display all markers\n* '*map-type*' - Map type to display: 'roadmap', 'satellite', 'hybrid', 'terrain'\n* '*center-latitude*'- Latitude of map initial center point\n* '*center-longitude*' - Longitude of map initial center point\n\nExample:\n\n```html\n\u003clit-google-map api-key=\"SOME_API_KEY\" zoom=\"6\" map-type=\"satellite\" center-latitude=\"51.8436554\" center-longitude=\"19.5070867\"\u003e    \n\u003c/lit-google-map\u003e\n```\n\n## Marker element attributes\n\n* '*latitude*' - Marker latitude position\n* '*longitude*' - Marker longitude position\n* '*label*' - Marker label\n* '*z-index*' - Marker z index\n* '*icon*' - Marker icon image url\n\nExample:\n\n```html\n\u003clit-google-map-marker slot=\"markers\" latitude=\"49.4404582\" longitude=\"20.2700361\"\u003e\n\u003c/lit-google-map-marker\u003e\n```\n\nMarkers can also have associated InfoWindow with html content:\n\n```html\n\u003clit-google-map-marker slot=\"markers\" latitude=\"50.797444\" longitude=\"20.4600623\"\u003e\n    \u003cp\u003eSome description\u003c/p\u003e\n    \u003cimg src=\"some_image.jpg\" alt=\"some image\"\u003e\n\u003c/lit-google-map-marker\u003e\n```\n\n## Circle shape element attributes\n\n* '*center-latitude*' - Circle center latitude position\n* '*center-longitude*' - Circle center longitude position\n* '*radius*' - Circle radius (default: 100000)\n* '*fill-color*' - Circle fill color\n* '*fill-opacity*' - Circle fill opacity\n* '*stroke-color*' - Circle stroke color\n* '*stroke-opacity*' - Circle stroke opacity\n* '*stroke-weight*' - Circle stroke weight\n\nExample:\n\n```html\n\u003clit-google-map-circle slot=\"shapes\" center-latitude=\"53.176389\" center-longitude=\"22.073056\" radius=\"50000\"  fill-color=\"#7FB3D5\" fill-opacity=\"0.35\" stroke-color=\"#2874A6\" stroke-opacity=\"0.8\" stroke-weight=\"5\"\u003e\n\u003c/lit-google-map-circle\u003e\n```\n\n## Polygon shape element attributes\n\n* '*paths*' - Polygon paths points in form of json array\n* '*fill-color*' - Polygon fill color\n* '*fill-opacity*' - Polygon fill opacity\n* '*stroke-color*' - Polygon stroke color\n* '*stroke-opacity*' - Polygon stroke opacity\n* '*stroke-weight*' - Polygon stroke weight\n\nExample:\n\n```html\n\u003clit-google-map-polygon slot=\"shapes\" paths='[{\"lat\": 53.7332, \"lng\": 15.5180}, {\"lat\": 54.0444, \"lng\": 18.1379}, {\"lat\": 53.2028, \"lng\": 16.9292}, {\"lat\": 53.7332, \"lng\": 15.5180}]' fill-color=\"#7FB3D5\" fill-opacity=\"0.35\" stroke-color=\"#2874A6\" stroke-opacity=\"0.8\" stroke-weight=\"5\"\u003e\n\u003c/lit-google-map-polygon\u003e   \n```\n\n## How to build\n\nBefore build install all required packages:\n\n```\nnpm install\n```\n\nBare build:\n\n```\nnpm run build\n```\n\nBuild with bundle step:\n\n```\nnpm run bundle\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkadiuszwojcik%2Flit-google-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkadiuszwojcik%2Flit-google-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkadiuszwojcik%2Flit-google-map/lists"}