Title: How to use TileLayer? · Issue #28 · plotly/dash-deck · GitHub
Open Graph Title: How to use TileLayer? · Issue #28 · plotly/dash-deck
X Title: How to use TileLayer? · Issue #28 · plotly/dash-deck
Description: Is TileLayer like https://deck.gl/docs/api-reference/geo-layers/tile-layer supported by dash-deck? If I run the example below I get a "white screen" and following error: layers-pass.js:96 Uncaught Error: GeoJSON does not have type at y (...
Open Graph Description: Is TileLayer like https://deck.gl/docs/api-reference/geo-layers/tile-layer supported by dash-deck? If I run the example below I get a "white screen" and following error: layers-pass.js:96 Uncaught ...
X Description: Is TileLayer like https://deck.gl/docs/api-reference/geo-layers/tile-layer supported by dash-deck? If I run the example below I get a "white screen" and following error: layers-pass.js:96...
Opengraph URL: https://github.com/plotly/dash-deck/issues/28
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to use TileLayer?","articleBody":"Is **TileLayer** like\r\n\r\nhttps://deck.gl/docs/api-reference/geo-layers/tile-layer\r\n\r\nsupported by dash-deck?\r\n\r\nIf I run the example below I get a \"white screen\" and following error:\r\n\r\n```\r\nlayers-pass.js:96 Uncaught Error: GeoJSON does not have type\r\n at y (assert.js:3:11)\r\n at t.value (log.js:109:7)\r\n at geojson.js:7:7\r\n at e.value (geojson-layer.js:87:22)\r\n at e.value (layer.js:775:14)\r\n at e.value (layer.js:755:14)\r\n at e.value (layer.js:515:14)\r\n at e.value (layers-pass.js:238:15)\r\n at e.value (layers-pass.js:118:36)\r\n at e.value (layers-pass.js:54:38)\r\n```\r\nThen I tried to include \r\n\r\n```\r\nrender_sub_layers=lambda props: pdk.Layer(\r\n \"BitmapLayer\",\r\n data=None,\r\n image=props.tile,\r\n bounds=props.tile_bounds,\r\n ),\r\n```\r\n \r\nand got \r\n\r\n error.js:16 TypeError: this.props.renderSubLayers is not a function\r\n\r\n=\u003e Could you please provide an example for TileLayers in the demo folder or clarify what features of deckgl are supported in the documentation?\r\n\r\n```\r\nimport dash\r\nimport dash_deck\r\nfrom dash import html\r\nimport pydeck as pdk\r\n\r\napp = dash.Dash(__name__)\r\n\r\n# Define a TileLayer for OpenStreetMap tiles\r\nosm_layer = pdk.Layer(\r\n \"TileLayer\",\r\n data=\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\r\n min_zoom=0,\r\n max_zoom=19,\r\n tile_size=256,\r\n)\r\n\r\n# Define the initial view state\r\nview_state = pdk.ViewState(\r\n longitude=-122.4, # Centered around San Francisco\r\n latitude=37.8,\r\n zoom=10,\r\n pitch=0,\r\n bearing=0,\r\n)\r\n\r\n# Create the deck.gl instance\r\nr = pdk.Deck(\r\n layers=[osm_layer],\r\n initial_view_state=view_state,\r\n)\r\n\r\n# Define the layout of the Dash app\r\napp.layout = html.Div(\r\n [\r\n dash_deck.DeckGL(\r\n r.to_json(),\r\n id=\"deck-gl\",\r\n style={\"height\": \"100vh\"},\r\n ),\r\n ]\r\n)\r\n\r\nif __name__ == \"__main__\":\r\n app.run_server(debug=True)\r\n```","author":{"url":"https://github.com/fhg-isi","@type":"Person","name":"fhg-isi"},"datePublished":"2024-09-20T10:18:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/28/dash-deck/issues/28"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:80a3456b-9402-d588-c0ff-d40041af5fb1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C872:E23DE:4E753:63D56:698D477E |
| html-safe-nonce | b3f6e683b7ef473910a763164c59b244a20c9db1b5eb987aaee0d55645d1bf44 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODcyOkUyM0RFOjRFNzUzOjYzRDU2OjY5OEQ0NzdFIiwidmlzaXRvcl9pZCI6IjE4OTQyMzE2NTkwNzY0NzA2NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b32600761a486593e3d2b877fa6cb3c85b3560345bc63565bb3b286ac9e57f4a |
| hovercard-subject-tag | issue:2538440726 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/dash-deck/28/issue_layout |
| twitter:image | https://opengraph.githubassets.com/daed4b9ec54050c9c5adf0723adcd63d3737e2e5ec0e0a2948834a467b337f49/plotly/dash-deck/issues/28 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/daed4b9ec54050c9c5adf0723adcd63d3737e2e5ec0e0a2948834a467b337f49/plotly/dash-deck/issues/28 |
| og:image:alt | Is TileLayer like https://deck.gl/docs/api-reference/geo-layers/tile-layer supported by dash-deck? If I run the example below I get a "white screen" and following error: layers-pass.js:96 Uncaught ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fhg-isi |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/dash-deck git https://github.com/plotly/dash-deck.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 288569889 |
| octolytics-dimension-repository_nwo | plotly/dash-deck |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 288569889 |
| octolytics-dimension-repository_network_root_nwo | plotly/dash-deck |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bc912d4349851e5f32c76bbb213754e40947d7a6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width