{"id":21539861,"url":"https://github.com/raruto/leaflet-pointable","last_synced_at":"2025-03-17T21:44:14.170Z","repository":{"id":57289894,"uuid":"190802738","full_name":"Raruto/leaflet-pointable","owner":"Raruto","description":"Leaflet plugin that allows to interact with semi-transparent tiled overlays","archived":false,"fork":false,"pushed_at":"2020-02-09T19:21:46.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T11:41:47.670Z","etag":null,"topics":["leaflet","overlay","pointable","transparency"],"latest_commit_sha":null,"homepage":"https://raruto.github.io/leaflet-pointable","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-06-07T20:09:24.000Z","updated_at":"2025-02-20T08:40:45.000Z","dependencies_parsed_at":"2022-08-25T07:40:45.930Z","dependency_job_id":null,"html_url":"https://github.com/Raruto/leaflet-pointable","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/Raruto%2Fleaflet-pointable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pointable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pointable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pointable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raruto","download_url":"https://codeload.github.com/Raruto/leaflet-pointable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244117001,"owners_count":20400734,"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":["leaflet","overlay","pointable","transparency"],"created_at":"2024-11-24T04:16:34.840Z","updated_at":"2025-03-17T21:44:14.148Z","avatar_url":"https://github.com/Raruto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# leaflet-pointable.js\r\nA Leaflet plugin that allows to interact with semi-transparent tiled overlays\r\n\r\n_For a working example see [demo](https://raruto.github.io/leaflet-pointable/examples/leaflet-pointable.html)_\r\n\r\n---\r\n\r\n## How to use\r\n\r\n1. **include CSS \u0026 JavaScript**\r\n    ```html\r\n    \u003chead\u003e\r\n    ...\r\n    \u003cstyle\u003e html, body, #map { height: 100%; width: 100%; padding: 0; margin: 0; } \u003c/style\u003e\r\n    \u003c!-- Leaflet (JS/CSS) --\u003e\r\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css\" /\u003e\r\n    \u003cscript src=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.js\"\u003e\u003c/script\u003e\r\n    \u003c!-- Leaflet-Pointable --\u003e\r\n    \u003cscript src=\"https://unpkg.com/leaflet-pointable@latest/leaflet-pointable.js\"\u003e\u003c/script\u003e\r\n    ...\r\n    \u003c/head\u003e\r\n    ```\r\n2. **choose a div container used for the slippy map**\r\n    ```html\r\n    \u003cbody\u003e\r\n    ...\r\n\t  \u003cdiv id=\"map\"\u003e\u003c/div\u003e\r\n    ...\r\n    \u003c/body\u003e\r\n    ```\r\n3. **create your first simple “leaflet-pointable slippy map**\r\n    ```html\r\n    \u003cscript\u003e\r\n      var map = L.map('map');\r\n      map.setView(new L.LatLng(45, 9.5), 5);\r\n\r\n      var control = L.control.layers(null, null, {\r\n        collapsed: false\r\n      }).addTo(map);\r\n\r\n      var Basemap = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {\r\n        maxZoom: 17,\r\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)',\r\n        opacity: 0.90\r\n        });\r\n      Basemap.addTo(map);\r\n\r\n      var Overlay = L.tileLayer('https://tile.waymarkedtrails.org/{id}/{z}/{x}/{y}.png', {\r\n        id: 'hiking',\r\n        pointable: true,\r\n        attribution: '\u0026copy; \u003ca href=\"http://waymarkedtrails.org\"\u003eSarah Hoffmann\u003c/a\u003e (\u003ca href=\"https://creativecommons.org/licenses/by-sa/3.0/\"\u003eCC-BY-SA\u003c/a\u003e)',\r\n      });\r\n      Overlay.addTo(map);\r\n\r\n      control.addOverlay(Overlay, \"ON / OFF\");\r\n\r\n      map.on(\"pointable_mouseclick\",function(e){\r\n        map.openPopup(\"\u003cb\u003eClicked overlay\u003c/b\u003e: \" + e.latlng.lat + \",\" + e.latlng.lng, e.latlng);\r\n      });\r\n\r\n    \u003c/script\u003e\r\n    ```\r\n\r\n---\r\n\r\n**Compatibile with:** leaflet@1.3.4\r\n\r\n---\r\n\r\n**Contributors:** [Raruto](https://github.com/Raruto/leaflet-pointable)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-pointable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraruto%2Fleaflet-pointable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-pointable/lists"}