{"id":15651343,"url":"https://github.com/soal/map-promisified","last_synced_at":"2025-04-15T01:08:52.658Z","repository":{"id":48028685,"uuid":"156087243","full_name":"soal/map-promisified","owner":"soal","description":"Wrapper for Mapbox Gl JS library that gives nice Promise-based API to asynchronous map functions","archived":false,"fork":false,"pushed_at":"2022-07-20T01:22:46.000Z","size":113,"stargazers_count":33,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T01:08:45.783Z","etag":null,"topics":["mapbox-gl","mapbox-gl-js","promise"],"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/soal.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":"2018-11-04T13:52:52.000Z","updated_at":"2024-07-06T11:57:30.000Z","dependencies_parsed_at":"2022-08-12T17:01:01.881Z","dependency_job_id":null,"html_url":"https://github.com/soal/map-promisified","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fmap-promisified","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fmap-promisified/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fmap-promisified/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fmap-promisified/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soal","download_url":"https://codeload.github.com/soal/map-promisified/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986313,"owners_count":21194025,"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":["mapbox-gl","mapbox-gl-js","promise"],"created_at":"2024-10-03T12:38:01.947Z","updated_at":"2025-04-15T01:08:52.641Z","avatar_url":"https://github.com/soal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# map-promisified\nWrapper for Mapbox Gl JS library that gives nice Promise-based API to asynchronous map functions\n\nUsage:\n```javascript\nimport promisify from 'map-promisified'\nimport Mapbox from 'mapbox-gl'\n\nconst map = new Mapbox.Map({\n  // … map properties …\n})\n\n// promisify single method:\nconst flyToPromisified = promisify(map, 'flyTo')\n\nasync function flyToPosition () {\n  const newPosition = await flyToPromisified([10, 20])\n  console.log(newPosition)\n  // ⇒ { bearing: 0\n  //​      center: Object { lng: …, lat: … },\n  //      pitch: 0,\n  //      zoom: 9\n  //    }\n}\n\n// promisify all async map methods:\nconst actions = promisify(map)\n\nasync function flyToPositionAction () {\n  const newPosition = await actions.flyTo([10, 20])\n  console.log(newPosition)\n  // ⇒ { bearing: 0\n  //​      center: Object { lng: …, lat: … },\n  //      pitch: 0,\n  //      zoom: 9\n  //    }\n}\n```\n\nPromisified methods:\n  * setCenter\n  * panBy\n  * panTo\n  * setZoom\n  * zoomTo\n  * zoomIn\n  * zoomOut\n  * setBearing\n  * rotateTo\n  * resetNorth\n  * snapToNorth\n  * setPitch\n  * fitBounds\n  * fitScreenCoordinates\n  * jumpTo\n  * easeTo\n  * flyTo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoal%2Fmap-promisified","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoal%2Fmap-promisified","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoal%2Fmap-promisified/lists"}