{"id":21539868,"url":"https://github.com/raruto/leaflet-pegman","last_synced_at":"2025-07-01T00:02:25.547Z","repository":{"id":56246494,"uuid":"158143101","full_name":"Raruto/leaflet-pegman","owner":"Raruto","description":"Leaflet plugin that allows easy integration with the Google StreetView Service API","archived":false,"fork":false,"pushed_at":"2025-02-12T19:57:27.000Z","size":370,"stargazers_count":24,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-01T00:01:58.421Z","etag":null,"topics":["google-maps","google-streetview-api","javascript","leaflet","leaflet-and-google","leaflet-control","pegman","streetview","streetview-control"],"latest_commit_sha":null,"homepage":"https://raruto.github.io/leaflet-pegman","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-19T01:02:59.000Z","updated_at":"2025-06-21T13:00:36.000Z","dependencies_parsed_at":"2025-05-20T21:01:11.449Z","dependency_job_id":null,"html_url":"https://github.com/Raruto/leaflet-pegman","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Raruto/leaflet-pegman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pegman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pegman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pegman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pegman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raruto","download_url":"https://codeload.github.com/Raruto/leaflet-pegman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-pegman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262870850,"owners_count":23377309,"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","google-streetview-api","javascript","leaflet","leaflet-and-google","leaflet-control","pegman","streetview","streetview-control"],"created_at":"2024-11-24T04:16:37.066Z","updated_at":"2025-07-01T00:02:25.161Z","avatar_url":"https://github.com/Raruto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# leaflet-pegman.js\n\n[![NPM version](https://img.shields.io/npm/v/leaflet-pegman.svg?color=red)](https://www.npmjs.com/package/leaflet-pegman)\n[![License](https://img.shields.io/badge/license-GPL%203-blue.svg?style=flat)](LICENSE)\n\nA Leaflet plugin that allows easy integration with the Google StreetView Service API\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://raruto.github.io/leaflet-pegman/examples/leaflet-pegman.html\"\u003e\u003cimg src=\"https://raruto.github.io/img/pegman-bio.png\" alt=\"Pegman Bio\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n_For a working example see one of the following demos:_\n\n- [traditional loading](https://raruto.github.io/leaflet-pegman/examples/leaflet-pegman.html)\n- [lazy loading](https://raruto.github.io/leaflet-pegman/examples/leaflet-pegman-lazyLoading.html)\n- [detached panorama](https://raruto.github.io/leaflet-pegman/examples/leaflet-pegman-panoDiv.html)\n\n---\n\n\u003cblockquote\u003e\n    \u003cp align=\"center\"\u003e\n        \u003cem\u003eInitially based on the \u003ca href=\"http://jsfiddle.net/pegues/a5mn1ogu/\"\u003ework\u003c/a\u003e of \u003cstrong\u003eDaniel Pegues\u003c/strong\u003e\u003c/em\u003e\n    \u003c/p\u003e\n\u003c/blockquote\u003e\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!-- Google Maps API --\u003e\n    \u003cscript src=\"https://maps.googleapis.com/maps/api/js?key=\u003cINSERT_HERE_API_KEY\u003e\"\u003e\u003c/script\u003e\n    \u003c!-- interact.js --\u003e\n    \u003cscript src=\"https://unpkg.com/interact.js@1.2.8/dist/interact.min.js\"\u003e\u003c/script\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-GoogleMutant --\u003e\n    \u003cscript src=\"https://unpkg.com/leaflet.gridlayer.googlemutant@0.10.0/Leaflet.GoogleMutant.js\"\u003e\u003c/script\u003e\n    \u003c!-- Leaflet-Pegman --\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/leaflet-pegman/@latest/leaflet-pegman.css\" /\u003e\n    \u003cscript src=\"https://unpkg.com/leaflet-pegman/@latest/leaflet-pegman.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-pegman slippy map**\n    ```html\n    \u003cscript\u003e\n      var map = L.map('map');\n      map.setView(new L.LatLng(45, 9.5), 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      var pegmanControl = new L.Control.Pegman({\n        position: 'bottomright', // position of control inside the map\n        theme: \"leaflet-pegman-v3-small\", // or \"leaflet-pegman-v3-default\"\n      });\n      pegmanControl.addTo(map);\n    \u003c/script\u003e\n    ```\n\n_**NB** to be able to use the “pegman” (a.k.a. “Street View Control”) you **MUST** use a valid [Google Maps API Key](https://developers.google.com/maps/documentation/javascript/get-api-key)._\n\n---\n\n**Compatibile with:** leaflet@1.6.0, gmaps@3.34, leaflet-googlemutant@0.10.0, interactJS@1.2.9\n\n---\n\n**Contributors:** [Pegues](http://jsfiddle.net/user/pegues/fiddles/), [Raruto](https://github.com/Raruto/leaflet-google)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-pegman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraruto%2Fleaflet-pegman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-pegman/lists"}