{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"never","basic_auth":false,"params":[],"results":{"codes":[]},"try":true},"next":{"description":"","pages":[]},"title":"Map tiles","type":"basic","slug":"blueprint-input-map-tiles","excerpt":"Map tiles data input for ViziCities","body":"This module lets you retrieve map tile images from a local or external endpoint. For example, you could use this module to request map tiles from Mapbox.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Name\"\n}\n[/block]\n`BlueprintInputMapTiles`\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Options\"\n}\n[/block]\nOverride module functionality with the following options.\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Option\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"`tilePath`\",\n \"0-1\": \"`String`\",\n \"0-2\": \"URL describing the map tile endpoint. Must contain `{x}`, `{y}` and `{z}` variables.\\n\\nEg. \\\"https://a.tiles.mapbox.com/v3/examples.map-i86l3621/{z}/{x}/{y}:::at:::2x.png\\\"\"\n },\n \"cols\": 3,\n \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Triggers\"\n}\n[/block]\nThese triggers are fired at various point during the lifetime of the module.\n\n## Trigger: `initialised`\n\nFired when the map tiles module has been added to the `World` and is ready to use.\n\n## Trigger: `tileReceived`\n\nFired when a tile image has been successfully received from the `tilePath` endpoint.\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`image`\",\n \"h-0\": \"Argument\",\n \"h-1\": \"Type\",\n \"h-2\": \"Example\",\n \"1-0\": \"`tile`\",\n \"1-1\": \"`Object`\",\n \"1-2\": \"```\\n{\\n x: 262116,\\n y: 174348,\\n z: 19\\n}\\n```\",\n \"0-1\": \"[`HTMLImageElement`](https://developer.mozilla.org/en/docs/Web/API/HTMLImageElement.Image)\"\n },\n \"cols\": 3,\n \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Actions\"\n}\n[/block]\nThese actions are exposed to the Blueprint API to be triggered by other modules.\n\n## Action: `requestTiles`\n\nRequests image tiles from the `tilePath` endpoint.\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Argument\",\n \"h-1\": \"Type\",\n \"h-2\": \"Example\",\n \"0-0\": \"`tiles`\",\n \"0-1\": \"`Array` of `Object`\",\n \"0-2\": \"```\\n[{\\n x: 262116,\\n y: 174348,\\n z: 19\\n}, {\\n x: 262117,\\n y: 174348,\\n z: 19\\n}]\\n```\"\n },\n \"cols\": 3,\n \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Example input\"\n}\n[/block]\nExample map tile image retrieved from the Mapbox URL `https://a.tiles.mapbox.com/v3/examples.map-i86l3621/{z}/{x}/{y}@2x.png`:\n[block:image]\n{\n \"images\": [\n {\n \"caption\": \"\",\n \"image\": [\n \"https://files.readme.io/dQVpx1QTlO55aNKIT59G_43587@2x.png\",\n \"43587@2x.png\",\n \"256\",\n \"256\",\n \"\",\n \"\"\n ]\n }\n ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"54557e58a1e5cd0e00435ed4","user":"545284e73f92fc0e009396c6","category":{"sync":{"isSync":false,"url":""},"pages":["54557a6435f4ac0800f42baf","54557c5435f4ac0800f42bb9","54557e58a1e5cd0e00435ed4","5456daaff037df0800035612"],"title":"Blueprint Inputs","slug":"blueprint-inputs","order":1,"from_sync":false,"reference":false,"_id":"54557a3135f4ac0800f42bad","createdAt":"2014-11-02T00:26:25.292Z","project":"545285163f92fc0e009396c7","version":"5452b671b7fa011600a75c25","__v":4},"createdAt":"2014-11-02T00:44:08.649Z","is_link":false,"version":{"version":"0.2.0","version_clean":"0.2.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["5452b671b7fa011600a75c26","545579ee35f4ac0800f42bac","54557a3135f4ac0800f42bad","54557b7b35f4ac0800f42bb3","54557c91a1e5cd0e00435ecc","54557caf35f4ac0800f42bbd","54557dc1a1e5cd0e00435ecf","54557e7ba1e5cd0e00435ed6","54557f81533d890e000cf8a9","54557fcd533d890e000cf8aa","54558020a1e5cd0e00435edf","545580b6533d890e000cf8ad","545580e1a1e5cd0e00435ee6"],"_id":"5452b671b7fa011600a75c25","__v":13,"createdAt":"2014-10-30T22:06:41.529Z","forked_from":"545285163f92fc0e009396ca","releaseDate":"2014-10-30T22:06:41.529Z","project":"545285163f92fc0e009396c7"},"__v":36,"githubsync":"","project":"545285163f92fc0e009396c7"}
Map tiles
Map tiles data input for ViziCities