{"id":21539862,"url":"https://github.com/raruto/leaflet-kmz","last_synced_at":"2025-08-20T12:31:52.336Z","repository":{"id":34640666,"uuid":"181383270","full_name":"Raruto/leaflet-kmz","owner":"Raruto","description":"A KMZ file loader for Leaflet Maps","archived":false,"fork":false,"pushed_at":"2023-02-02T17:12:02.000Z","size":799,"stargazers_count":49,"open_issues_count":4,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-07T17:13:30.547Z","etag":null,"topics":["geojson-vt","javascript","jszip","kml","kmz","leaflet","leaflet-and-kmz","mapbox","togeojson"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Raruto.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-04-14T23:58:19.000Z","updated_at":"2024-10-27T10:53:59.000Z","dependencies_parsed_at":"2023-02-17T22:30:56.682Z","dependency_job_id":null,"html_url":"https://github.com/Raruto/leaflet-kmz","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-kmz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-kmz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-kmz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-kmz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raruto","download_url":"https://codeload.github.com/Raruto/leaflet-kmz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423563,"owners_count":18223435,"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":["geojson-vt","javascript","jszip","kml","kmz","leaflet","leaflet-and-kmz","mapbox","togeojson"],"created_at":"2024-11-24T04:16:35.635Z","updated_at":"2024-12-19T11:12:41.094Z","avatar_url":"https://github.com/Raruto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# leaflet-kmz\n\n[![NPM version](https://img.shields.io/npm/v/leaflet-kmz.svg?color=red)](https://www.npmjs.com/package/leaflet-kmz)\n[![License](https://img.shields.io/badge/license-GPL%203-blue.svg?style=flat)](LICENSE)\n\nA KMZ file loader for Leaflet Maps\n\n_For a working example see one of the following demos:_\n\n- [kmz layers](https://raruto.github.io/leaflet-kmz/examples/leaflet-kmz.html)\n- [vector grid](https://raruto.github.io/leaflet-kmz/examples/leaflet-kmz_gridlayer.html)\n\n\n---\n\n## How to use\n\n1. **include CSS \u0026 JavaScript**\n    ```html\n    \u003chead\u003e\n    ...\n    \u003cstyle\u003e html, body, #map { height: 100%; width: 100%; padding: 0; margin: 0; } \u003c/style\u003e\n    \u003c!-- Leaflet (JS/CSS) --\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css\"\u003e\n    \u003cscript src=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.js\"\u003e\u003c/script\u003e\n    \u003c!-- Leaflet-KMZ --\u003e\n    \u003cscript src=\"https://unpkg.com/leaflet-kmz@latest/dist/leaflet-kmz.js\"\u003e\u003c/script\u003e\n    ...\n    \u003c/head\u003e\n    ```\n2. **choose a div container used for the slippy map**\n    ```html\n    \u003cbody\u003e\n    ...\n\t  \u003cdiv id=\"map\"\u003e\u003c/div\u003e\n    ...\n    \u003c/body\u003e\n    ```\n3. **create your first simple “leaflet-kmz” slippy map**\n    ```html\n    \u003cscript\u003e\n      var map = L.map('map', {\n        preferCanvas: true // recommended when loading large layers.\n      });\n      map.setView(new L.LatLng(43.5978, 12.7059), 5);\n\n      var OpenTopoMap = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {\n        maxZoom: 17,\n        attribution: 'Map data: \u0026copy; \u003ca href=\"http://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e, \u003ca href=\"http://viewfinderpanoramas.org\"\u003eSRTM\u003c/a\u003e | Map style: \u0026copy; \u003ca href=\"https://opentopomap.org\"\u003eOpenTopoMap\u003c/a\u003e (\u003ca href=\"https://creativecommons.org/licenses/by-sa/3.0/\"\u003eCC-BY-SA\u003c/a\u003e)',\n        opacity: 0.90\n      });\n      OpenTopoMap.addTo(map);\n\n      // Instantiate KMZ layer (async)\n      var kmz = L.kmzLayer().addTo(map);\n\n      kmz.on('load', function(e) {\n        control.addOverlay(e.layer, e.name);\n        // e.layer.addTo(map);\n      });\n\n      // Add remote KMZ files as layers (NB if they are 3rd-party servers, they MUST have CORS enabled)\n      kmz.load('https://raruto.github.io/leaflet-kmz/examples/regions.kmz');\n      kmz.load('https://raruto.github.io/leaflet-kmz/examples/capitals.kmz');\n      kmz.load('https://raruto.github.io/leaflet-kmz/examples/globe.kmz');\n\n      var control = L.control.layers(null, null, { collapsed:false }).addTo(map);\n    \u003c/script\u003e\n    ```\n\n**Notes:**\n- supported file formats: **.kmz**, **.kml**\n- to be able to use Google files (eg. through Google My Maps) you **MUST** use a valid third-party kml proxy server\n\n---\n\n**Compatibile with:** leaflet@1.6.0, jszip@3.2.0, @tmcw/togeojson@4.1.0\n\n---\n\n**Contributors:** [A-Lurker](https://github.com/a-lurker/leaflet-kmz), [BrandonXiang](https://github.com/brandonxiang/leaflet-geojson-vt), [Raruto](https://github.com/Raruto/leaflet-kmz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-kmz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraruto%2Fleaflet-kmz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-kmz/lists"}