{"id":22374237,"url":"https://github.com/metamediatechnology/rainviewer-longdomap","last_synced_at":"2026-03-10T14:04:30.301Z","repository":{"id":38273920,"uuid":"405821094","full_name":"MetamediaTechnology/rainviewer-longdomap","owner":"MetamediaTechnology","description":"Rain API with Longdo Map","archived":false,"fork":false,"pushed_at":"2025-05-29T15:03:56.000Z","size":6739,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T21:45:34.979Z","etag":null,"topics":["map","rain","rainfall"],"latest_commit_sha":null,"homepage":"https://bankjirapan.github.io/rain.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MetamediaTechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-09-13T03:31:47.000Z","updated_at":"2025-05-29T14:34:41.000Z","dependencies_parsed_at":"2022-08-18T13:12:04.372Z","dependency_job_id":"0cf8f3ef-14c7-4529-ac34-396873291935","html_url":"https://github.com/MetamediaTechnology/rainviewer-longdomap","commit_stats":{"total_commits":34,"total_committers":4,"mean_commits":8.5,"dds":0.4411764705882353,"last_synced_commit":"201a0a61a7c3a435bc29e992bbf090e24f98c74c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MetamediaTechnology/rainviewer-longdomap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetamediaTechnology%2Frainviewer-longdomap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetamediaTechnology%2Frainviewer-longdomap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetamediaTechnology%2Frainviewer-longdomap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetamediaTechnology%2Frainviewer-longdomap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetamediaTechnology","download_url":"https://codeload.github.com/MetamediaTechnology/rainviewer-longdomap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetamediaTechnology%2Frainviewer-longdomap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30336100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["map","rain","rainfall"],"created_at":"2024-12-04T21:16:29.363Z","updated_at":"2026-03-10T14:04:30.278Z","avatar_url":"https://github.com/MetamediaTechnology.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Longdo Map Logo](https://map.longdo.com/themes/longdo/logo.png)\n\n# Rain Viewer - Longdo Map JS API 2\n![Rain Viewer on Longdo Map](https://raw.githubusercontent.com/MetamediaTechnology/rainviewer-longdomap/main/screenshot/preview.gif)\n\nThis plugin integrates RainViewer’s weather radar data with the Longdo Map JS API, allowing you to display real-time precipitation radar directly on your maps.\n\n## Getting Started\n\n### Usage\n\nTo begin, you’ll need a [Longdo Map API key](https://map.longdo.com/docs/javascript/getapi).  \nOnce you have your API key and have cloned this project, register the key in your `index.html` file.\n\n\n#### Register map api key\nSTEP 1 : Loading the API Code Libraries\nUsing the following script within tag\n```js\n\u003cscript src=\"https://api.longdo.com/map/?key=[YOUR_KEY_API]\"\u003e\u003c/script\u003e\n```\nStep 2: Initialize the Map\nCreate a longdo.Map object with JavaScript:\n```js\nvar map;\nfunction init() {\n  map = new longdo.Map({\n    placeholder: document.getElementById('map')\n  });\n}\n```\nStep 3: Complete HTML Structure\nInclude the map container and use onload to initialize the map:\n```html\n\u003cbody onload=\"init();\"\u003e\n  \u003cdiv id=\"map\"\u003e\u003c/div\u003e\n\u003c/body\u003e\n```\n\n#### Import rainradar.js\nSTEP1: Import rainradar.js into html file.\n```js\n\u003cscript src=\"./lib/rainradar.js\"\u003e\u003c/script\u003e\n```\nSTEP2: Create the Rain Radar Layer\n```js\n var rainRadar = new RainRadar(map, options);\n```\n#### Parameter\nmap : Map object (Required).\noptions : Initial setup your rain radar (optional).\nExample\n```js\nvar rainRadar = new RainRadar(map, {\n  opacity: 0.5,               // Opacity level\n  color: 4,                   // Radar color scheme\n  locale: 'th-TH',            // Display locale\n  tileSize: 256,              // Tile size (256 or 512)\n  timeDisplay: 'timeradar',   // Element ID to display time\n  smooth: 0,                  // Blur effect (0 = off, 1 = on)\n  snow: 1,                    // Show snow (1 = yes, 0 = no)\n  speed: 2000                 // Animation speed (ms)\n});\n```\n#### Available Methods\n```js\nsetOpacity(value)     // Set layer opacity (0 - 0.9)\nsetColor(value)       // Set radar color scheme\nsetLocale(locale)     // Set display locale (e.g., \"th-TH\", \"en-US\")\nrainNext()            // Show next radar frame\nrainBack()            // Show previous radar frame\nrainNow()             // Display current radar frame\nplayAnimation(speed)  // Toggle radar animation, optional speed (ms)\nreload()              // Reload radar data\nclearLayers()         // Clear all radar layers\n```\n#### Example Usage\n```js\nvar map = new longdo.Map({\n  placeholder: document.getElementById(\"map\")\n});\n\nvar rainRadar = new RainRadar(map, {\n  opacity: 0.5,\n  color: 2,\n  tileSize: 256,\n  speed: 500,\n  timeDisplay: 'timeradar'\n});\n\nfunction next() {\n  rainRadar.rainNext();\n}\n\nfunction previous() {\n  rainRadar.rainBack();\n}\n\nfunction radarNow() {\n  rainRadar.rainNow();\n}\n\nfunction changeOpacity(e) {\n  const val = e.target.value;\n  rainRadar.setOpacity(val);\n}\n\nfunction play() {\n  const playButton = document.getElementById('play');\n  const isPlayed = rainRadar.playAnimation();\n  playButton.innerHTML = isPlayed ? 'Stop' : 'Play';\n}\n\nfunction clearLayer() {\n  rainRadar.clearLayers();\n}\n```\n\n## References\n* [Longdo Map](https://map.longdo.com/products)\n* [Longdo Map API Documentation](https://map.longdo.com/docs/)\n* [RainViewer API](https://www.rainviewer.com/th/api.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetamediatechnology%2Frainviewer-longdomap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetamediatechnology%2Frainviewer-longdomap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetamediatechnology%2Frainviewer-longdomap/lists"}