{"id":18249481,"url":"https://github.com/rossengeorgiev/nite-overlay","last_synced_at":"2025-04-04T15:32:58.802Z","repository":{"id":6544430,"uuid":"7785919","full_name":"rossengeorgiev/nite-overlay","owner":"rossengeorgiev","description":"🌍 Nightime overlay with all twilight zones for Google Maps API 3 ","archived":false,"fork":false,"pushed_at":"2023-04-28T22:55:50.000Z","size":246,"stargazers_count":80,"open_issues_count":2,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-20T15:03:21.580Z","etag":null,"topics":["google-maps-api","javascript","night","overlay"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rossengeorgiev.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}},"created_at":"2013-01-23T23:04:50.000Z","updated_at":"2025-01-01T14:52:52.000Z","dependencies_parsed_at":"2024-11-05T09:42:42.782Z","dependency_job_id":"92b88b22-0487-46bc-870d-841958f1f52b","html_url":"https://github.com/rossengeorgiev/nite-overlay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossengeorgiev%2Fnite-overlay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossengeorgiev%2Fnite-overlay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossengeorgiev%2Fnite-overlay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossengeorgiev%2Fnite-overlay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rossengeorgiev","download_url":"https://codeload.github.com/rossengeorgiev/nite-overlay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247203161,"owners_count":20900927,"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-api","javascript","night","overlay"],"created_at":"2024-11-05T09:40:08.550Z","updated_at":"2025-04-04T15:32:53.794Z","avatar_url":"https://github.com/rossengeorgiev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Preview of Nite Overlay](preview.jpg \"Preview of Nite Overlay\")\n\n# Nite Overlay - Overview\n\nGenerates an overlay to illustrate the day/night cycle.\nThere are 4 shade levels going from light to dark.\nThey are civil twilight, nautical twilight, astronomical twilight and night.\n\nWorks with Google Maps API v3\n\nThe sun position is estimated using an adapted method from NOAA's solar calculator, which is based on equations from Astronomical Algorithms, by Jean Meeus.  \nMore details: https://gml.noaa.gov/grad/solcalc/calcdetails.html\n\n*Might not work on some mobile devices. I've not explored the reason for this*\n\n## Quick start\n\n```javascript\nvar map = google.maps.Map(...);\nnite.init(map);\n```\nUse `refresh()` method to update the overlay periodically. Perhaps via `setInterval()`;\n\n```\nsetInterval(function() { nite.refresh() }, 10000); // every 10s\n```\n\nAlternatively, a specific date can be selected via `setDate()` followed by a call to `refresh()` to redraw the overlay. Setting the date to `null` will cause nite overlay to use current date and time.\n\nNote: *If the overlay is hidden and refresh() is called, the overlay position will not be updated.  \nNot until the overlay is visible again.*\n\n## Available methods\n\n`nite.setMap()` set a specific map object  \n`nite.setDate(Date object)` set a specific datetime, or `null` to use current datetime  \n`nite.calculatePositionOfSun(Date object)` returns LatLng for the specified date (has no effect on the overlay)  \n`nite.refresh()` Recalculate and refresh the position of the overlay  \n`nite.isVisible()` returns a boolean if the overlay is visible on the map  \n`nite.show()` Make the overlay visible  \n`nite.hide()` Hide the overlay  \n`nite.getSunPosition()` returns LatLng for the Sun  \n`nite.getShadowPosition()` returns LatLng for the night side  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossengeorgiev%2Fnite-overlay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frossengeorgiev%2Fnite-overlay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossengeorgiev%2Fnite-overlay/lists"}