{"id":25940719,"url":"https://github.com/2003scape/rsc-world-map","last_synced_at":"2025-10-26T00:48:14.599Z","repository":{"id":57093513,"uuid":"326500756","full_name":"2003scape/rsc-world-map","owner":"2003scape","description":" 🗺️ interactive world map for runescape classic","archived":false,"fork":false,"pushed_at":"2021-01-12T17:06:08.000Z","size":1935,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-09T12:48:03.070Z","etag":null,"topics":["landscape","map","rsc","rsps","runescape"],"latest_commit_sha":null,"homepage":"https://2003scape.github.io/map.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2003scape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-03T21:06:53.000Z","updated_at":"2024-07-09T18:36:37.000Z","dependencies_parsed_at":"2022-08-22T20:40:46.628Z","dependency_job_id":null,"html_url":"https://github.com/2003scape/rsc-world-map","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/2003scape%2Frsc-world-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-world-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-world-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-world-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2003scape","download_url":"https://codeload.github.com/2003scape/rsc-world-map/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787664,"owners_count":20020136,"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":["landscape","map","rsc","rsps","runescape"],"created_at":"2025-03-04T05:18:38.608Z","updated_at":"2025-10-26T00:48:09.575Z","avatar_url":"https://github.com/2003scape.png","language":"JavaScript","readme":"# rsc-world-map\ninteractive world map for runescape classic.\n\n![](./doc/screenshot.png)\n\n*[Watch a video demonstration](https://www.youtube.com/watch?v=9F10vvMgC-o)*\n\nfeatures:\n* mobile and tablet support with touch controls (still WIP)\n* works with any *height x width* \u003e= `300px x 300px`\n* four levels of zoom with crisp, pixelated landscape and anti-aliased text\n* overview box for quick navigation across ends of the map\n* go up and down plane levels to view dungeons and upstairs areas\n* search box with automatic suggestions\n* toggle labels, object and points of interest\n* native javascript with zero framework dependencies, just import and specify a\nblock container element\n* zero additional HTTP requests - everything packed inside the javascript\n\n## install\n\n    $ npm install @2003scape/rsc-world-map\n\n## usage\n```javascript\nconst WorldMap = require('@2003scape/rsc-world-map');\n\nconst container = document.createElement('div');\ncontainer.style.height = '300px';\ncontainer.style.width = '300px';\ncontainer.style.border = '1px solid #f0f';\n\nconst worldMap = new WorldMap({ container });\n\nworldMap.init().then(() =\u003e {\n    console.log('loaded');\n});\n\ndocument.body.style.background = '#000';\ndocument.body.appendChild(container);\n```\n\n## api\n\n### worldMap = new WorldMap({ container, labels?, points?, objects? })\ncreate a new worldMap instance.\n\n`container` is any block element.\n\nthe rest of the properties are optional, and defaulted to official runescape\nclassic entries (located in `./res`):\n\n`labels` are used for the text overlay on the map:\n\n```javascript\n{\n    \"text\": \"Kingdom of\\nKandarin\",\n    \"x\": 7705,\n    \"y\": 6821,\n    \"size\": 12,\n    \"align\": \"center\" || \"left\",\n    \"bold\": true, // optional\n    \"colour\": \"rgb(254, 165, 0)\" || \"#ff00ff\" || \"red\" // optional\n}\n```\n\n`points` are used for the point-of-interest symbols on the map. there's a list\nof point types in [`./res/key.json`](/res/key.json):\n\n```javascript\n{ \"type\": \"altar\", \"x\": 7253, \"y\": 7272 }\n```\n\nthe coordinates for points and labels are absolute.\n\n`objects` are used for the *+* symbols peppered over the map:\n\n```javascript\n{ \"id\": 0, \"x\": 345, \"y\": 538 }\n```\n\nthe coordinates for objects are in-game coordinates from\n[@2003scape/rsc-data](https://github.com/2003scape/rsc-data/blob/master/locations/objects.json)\n(note that `direction` is not needed here). trees (id 0) are coloured green\nwhile the rest are orange.\n\n### worldMap.init()\nload the images, attach the event handlers and populate the container element.\n\n## static map images\nto generate a static PNG of the world map, use the CLI tool in\n[@2003scape/rsc-landscape](https://github.com/2003scape/rsc-landscape#cli-usage)\n\nyou can also use this to generate the `plane-x.png` images in [`./res/`](/res/).\n\n## license\nCopyright (C) 2021  2003Scape Team\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see http://www.gnu.org/licenses/.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-world-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2003scape%2Frsc-world-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-world-map/lists"}