{"id":16438810,"url":"https://github.com/ghettovoice/ol-tilecache","last_synced_at":"2025-12-12T04:39:27.100Z","repository":{"id":57314105,"uuid":"45257826","full_name":"ghettovoice/ol-tilecache","owner":"ghettovoice","description":"OpenLayers tile url function to load tile seeded with TileCache URL scheme","archived":false,"fork":false,"pushed_at":"2020-10-22T11:35:18.000Z","size":619,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T22:16:47.336Z","etag":null,"topics":["hacktoberfest","ol","ol-plugins","ol-tilecache","ol3","ol4","openlayers","openlayers3","openlayers4","tilecache"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ghettovoice.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":"2015-10-30T15:02:36.000Z","updated_at":"2023-11-02T18:54:58.000Z","dependencies_parsed_at":"2022-09-12T18:00:35.667Z","dependency_job_id":null,"html_url":"https://github.com/ghettovoice/ol-tilecache","commit_stats":null,"previous_names":["ghettovoice/ol3-tilecache"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghettovoice%2Fol-tilecache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghettovoice%2Fol-tilecache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghettovoice%2Fol-tilecache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghettovoice%2Fol-tilecache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghettovoice","download_url":"https://codeload.github.com/ghettovoice/ol-tilecache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"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":["hacktoberfest","ol","ol-plugins","ol-tilecache","ol3","ol4","openlayers","openlayers3","openlayers4","tilecache"],"created_at":"2024-10-11T09:06:25.140Z","updated_at":"2025-12-12T04:39:27.070Z","avatar_url":"https://github.com/ghettovoice.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/ghettovoice/ol-tilecache.svg?branch=master)](https://travis-ci.com/ghettovoice/ol-tilecache)\n[![Coverage Status](https://coveralls.io/repos/github/ghettovoice/ol-tilecache/badge.svg?branch=master)](https://coveralls.io/github/ghettovoice/ol-tilecache?branch=master)\n[![GitHub tag](https://img.shields.io/github/tag/ghettovoice/ol-tilecache.svg)](https://github.com/ghettovoice/ol-tilecache/releases)\n[![view on npm](http://img.shields.io/npm/v/ol-tilecache.svg)](https://www.npmjs.org/package/ol-tilecache)\n[![License](https://img.shields.io/github/license/ghettovoice/ol-tilecache.svg)](https://github.com/ghettovoice/ol-tilecache/blob/master/LICENSE)\n\n# TileCache url function for OpenLayers\n\nAllows create custom [`ol.TileUrlFunctionType`](http://openlayers.org/en/latest/apidoc/ol.html#.TileUrlFunctionType) to load tiles \nseeded with [TileCache](http://tilecache.org/).\n\n## Installation\n\nInstall it with NPM (**recommended**):\n\n```shell\n# ES6 version for bundling with Webpack, Rollup and etc.\nnpm install ol ol-tilecache\n```\n\n```js\n// Use as ES2015 module (based on NPM package `ol`)\nimport Map from 'ol/Map'\n...\nimport * as TileCacheUrlFn from 'ol-tilecache'\n// or only what you need\nimport { createTileUrlFunction } from 'ol-tilecache'\n```\n\nOr add from CDN:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.0.0/build/ol.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/ol-tilecache@latest/dist/ol-tilecache.umd.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  // plugin exports global variable TileCacheUrlFn\n  // in addition it also exported to `ol.tileCacheUrlFn` field (for backward compatibility).\n\u003c/script\u003e\n```\n\n## Usage\n\nUsage same as standard OpenLayers tile url functions.\n\n### Members\n\n#### createTileUrlFunction\n**Arguments**\n\n* `url : string` _URL template_\n* `tileGrid : ol.tilegrid.TileGrid` _Custom tile grid. Default is EPSG:3857 x/y/z grid_\n    \n**Returns**: `ol.TileUrlFunctionType`\n\nAvailable URL placeholders:\n```\nz | 0z - zoom level (simple number or padded with zero)\nx1, x2, x3 - X axis index parts (remnant from dividing the tile X index on 10^9 broken down by 3 digits)\ny1, y2, y3 - Y axis index parts (remnant from dividing the tile Y index on 10^9 broken down by 3 digits)\n-y1, -y2, -y3 - inverted Y axis index parts (remnant from dividing the tile Y index on 10^9 broken down by 3 digits)\n```\n    \n### Example usage:\n\n```js\nimport Map from 'ol/Map'\nimport View from 'ol/View'\nimport TileLayer from 'ol/layer/Tile'\nimport XyzSource from 'ol/source/XYZ'\nimport { createTileUrlFunction } from 'ol-tilecache'\n\nconst map = new Map({\n  target: 'map',\n  view: new View({\n    projection: 'EPSG:3857',\n    center: [ 4189972.14, 7507950.67 ],\n    zoom: 5\n  }),\n  layers: [\n    new TileLayer({\n      source: new XyzSource({\n        tileUrlFunction: createTileUrlFunction('http://{a-z}.tiles.org/{0z}/{x1}/{x2}/{x3}/{-y1}/{-y2}/{-y3}.png')\n      })\n    })\n  ]\n})\n\n```\n\n### Build\n\n```bash\ngit clone https://github.com/ghettovoice/ol-tilecache.git\nnpm install\n# build\nnpm run build\n# run test app\nnpm start\n# run unit tests\nnpm test\n```\n\n## License\n\nMIT (c) 2016-2020, Vladimir Vershinin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghettovoice%2Fol-tilecache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghettovoice%2Fol-tilecache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghettovoice%2Fol-tilecache/lists"}