{"id":17104276,"url":"https://github.com/keyang/osmap-pg","last_synced_at":"2025-09-10T00:44:16.130Z","repository":{"id":21436243,"uuid":"24754472","full_name":"Keyang/osmap-pg","owner":"Keyang","description":"ordnance survey map phonegap plugin (temp)","archived":false,"fork":false,"pushed_at":"2014-10-09T11:53:23.000Z","size":888,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T20:12:01.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Keyang.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}},"created_at":"2014-10-03T10:20:35.000Z","updated_at":"2014-10-08T16:40:06.000Z","dependencies_parsed_at":"2022-08-21T12:11:03.563Z","dependency_job_id":null,"html_url":"https://github.com/Keyang/osmap-pg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Keyang/osmap-pg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Keyang%2Fosmap-pg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Keyang%2Fosmap-pg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Keyang%2Fosmap-pg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Keyang%2Fosmap-pg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Keyang","download_url":"https://codeload.github.com/Keyang/osmap-pg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Keyang%2Fosmap-pg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274390719,"owners_count":25276408,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-14T15:36:04.218Z","updated_at":"2025-09-10T00:44:16.076Z","avatar_url":"https://github.com/Keyang.png","language":"JavaScript","readme":"#Offline map PhoneGap Plugin\nThis plugin connects to a native implenetation which reads map tiles from a sqlite database. The plugin consists of:\n\n* Native Sqlite DB loader\n* Native PhoneGap Plugin\n* Js PhoneGap Plugin \n* Leaflet.js \n* Leafletjs Tile plugin \n\n#Build \nFor plugin developers, there is a build-www.py python script to build and generate production version of the plugin.\n\n\n#Installation\nTo install the plugin, goto cordova project root folder and run \n```bash\ncordova plugins add https://github.com/Keyang/osmap-pg.git\n```\nThe installation will do the following:\n\n* Embed plugin export module to cordova_plugin.js file as like other plugins \n* Generate osmap.js file in the root of www folder \n* Generate osmap.css file in the root of www folder\n\nThe generated files will only display in platforms folder once run cordova prepare\n\n#Usage\nOnce the plugins is installed, we can use it from hybrid app.\n\n##index.html\nAdd following lines to your cordova project's index.html:\n```html\n\u003cscript type=\"text/javascript\" src=\"osmap.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"osmap.css\"/\u003e\n```\n\nthe osmap.js will include leaflet.js map library and osmap tile plugin while osmap.css file will introduce the required css for map rendering.\n\n##OSMapTile\nOSMapTile is a leaflet.js tile plugin specifically for osmap phonegap plugin.\nIt is used to retrieve map tiles from osmap phonegap plugin and render it on map.\nThe usage is very simple:\n```Javascript \nvar map=L.map(\"mymap\");\nvar ostileLayer=new L.TileLayer.OSmapTile(options);\nostileLayer.addTo(map);\n```\nThe options are standard leaflet tile layer options which can be found [here](http://leafletjs.com/reference.html#tilelayer).\n\n##Leaftlet.js map \nOnce the tile being added to leaflet.js map, it has full functionality of leaflet.js. Leaflet.js API doc can be found [here](http://leafletjs.com/reference.html).\n\n\n##osmap lib \nosmap is a PhoneGap plugin responsible for all mapping data related activities.\nIt has following functions:\n\n* Retrive mapping tiles from database based on x,y,z parameter. The x,y,z parameters are following [slippy map tilename](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)\n\n\nosmap is an object attached to browser's window object. It has following functions:\n\n* getMapTile (options, successcb, failcb): this function is called internally inside osmaptilelayer to retrieve tile data.\n\n\n\n###getMapTile \n Get a map tile from PhoneGap plugin returninng base64 encoded PNG image\n\n  params:\n```\n  options:{\n   x:int, x coord\n   y:int, y coord \n   z:int, zoom level\n  }\n```\n  successcb: successful callback function(base64encodedimgdata) \n\n  failcb: failed callback function(error)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyang%2Fosmap-pg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeyang%2Fosmap-pg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyang%2Fosmap-pg/lists"}