{"action":"created","issue":{"url":"https://api.github.com/repos/openseadragon/openseadragon/issues/690","labels_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/690/labels{/name}","comments_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/690/comments","events_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/690/events","html_url":"https://github.com/openseadragon/openseadragon/issues/690","id":97540911,"number":690,"title":"Question: Implementing Custom Tile Source","user":{"login":"susanmonnelly","id":12297503,"avatar_url":"https://avatars.githubusercontent.com/u/12297503?v=3","gravatar_id":"","url":"https://api.github.com/users/susanmonnelly","html_url":"https://github.com/susanmonnelly","followers_url":"https://api.github.com/users/susanmonnelly/followers","following_url":"https://api.github.com/users/susanmonnelly/following{/other_user}","gists_url":"https://api.github.com/users/susanmonnelly/gists{/gist_id}","starred_url":"https://api.github.com/users/susanmonnelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/susanmonnelly/subscriptions","organizations_url":"https://api.github.com/users/susanmonnelly/orgs","repos_url":"https://api.github.com/users/susanmonnelly/repos","events_url":"https://api.github.com/users/susanmonnelly/events{/privacy}","received_events_url":"https://api.github.com/users/susanmonnelly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openseadragon/openseadragon/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-07-27T19:44:59Z","updated_at":"2015-08-03T16:11:16Z","closed_at":null,"body":"I'm new to  OpenSeadragon and have been trying to implement a custom tile source implementation.  We  have our own service that will cut up images into tiles and return them in a json format.\r\n\r\nI discovered that if I set the tileSources to the json request url then the getImageInfo method is called.   But I am getting an error that the No TileSource was able to open this request. \r\nHere's my request:\r\n`\r\n\t  var viewer = OpenSeadragon({\r\n                id: \"openseadragon1\",\r\n\t\ttoolbar: \"toolbarDiv\",\r\n               constrainDuringPan: true,\r\n               visibilityRatio: 1,\r\n               prefixUrl: \"/scripts/images/\",\r\n  \t       showRotationControl: true,\r\n               tileSources: tile_json_request\r\n\t  });\r\n`\r\n\r\nHow would I be able to set the TileSource data type?   I have an implementation of TileSource that I think may work but when the code hits my \"supports\" method the data type is null.   How would I set that data type in the above situation?    Or am I trying to implement this incorrectly?\r\n\r\nI've also tried to implement my own TileSource and initialize it like this:\r\n\r\n`\r\nvar viewer = OpenSeadragon({\r\n        id: \"openseadragon1\",\r\n\ttoolbar: \"toolbarDiv\",\r\n        constrainDuringPan: true,\r\n        visibilityRatio: 1,\r\n        prefixUrl: \"/scripts/images/\",\r\n  \tshowRotationControl: true,\r\n\t tileSources: [{\r\n\t    type: 'nbtileservice',\r\n\t    width: srcWidth,\r\n            height: srcHeight,\r\n            tilesUrl: tile_json_request\r\n\t }]\r\n});\r\n`\r\n\r\nAnd I was able to get the 'supports' and 'configure' to fire but the 'getImageInfo' request would not fired.   If this is the path I should take to make this work then I will focus on that and post that code.\r\n\r\nThanks for any help you can offer.\r\n\r\nSusan "},"comment":{"url":"https://api.github.com/repos/openseadragon/openseadragon/issues/comments/127292569","html_url":"https://github.com/openseadragon/openseadragon/issues/690#issuecomment-127292569","issue_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/690","id":127292569,"user":{"login":"iangilman","id":338989,"avatar_url":"https://avatars.githubusercontent.com/u/338989?v=3","gravatar_id":"","url":"https://api.github.com/users/iangilman","html_url":"https://github.com/iangilman","followers_url":"https://api.github.com/users/iangilman/followers","following_url":"https://api.github.com/users/iangilman/following{/other_user}","gists_url":"https://api.github.com/users/iangilman/gists{/gist_id}","starred_url":"https://api.github.com/users/iangilman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iangilman/subscriptions","organizations_url":"https://api.github.com/users/iangilman/orgs","repos_url":"https://api.github.com/users/iangilman/repos","events_url":"https://api.github.com/users/iangilman/events{/privacy}","received_events_url":"https://api.github.com/users/iangilman/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T16:11:16Z","updated_at":"2015-08-03T16:11:16Z","body":"Ah! I'm sorry I didn't see this before...you're overriding getImageInfo, so of course it's not behaving the way I expect it to. `configure`, `supports`, `getTileUrl` are all expected to be overridden, but `getImageInfo` is not. \r\n\r\nIt looks like part of the confusion is that you have potentially two files that you need to load? One for the width/height/tilesize and one with the tile locations? Can those be combined into a single call to the server? If not, what you're doing seems to work, so you can run with it. You might want to change the name of your `getImageInfo` because its purpose is different than the built in `getImageInfo` (i.e. yours gets secondary info, whereas the built in one is for getting primary info). \r\n\r\nAnyway, glad you found something that works; apologies for not noticing the issue sooner! "}}