Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Custom Layer is Not Displaying on Map #2879

Open
Daim-Nickel-Penny opened this issue Dec 31, 2024 · 2 comments
Open

Issue: Custom Layer is Not Displaying on Map #2879

Daim-Nickel-Penny opened this issue Dec 31, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Daim-Nickel-Penny
Copy link

My goal is to add a custom layer which returns a deck.gl layer and can be shown on map. So far I created the custom layer class (located in src/layers/src/custom-layer) that extends the Layer class and includes basic getter methods such as layerIcon, type, and renderLayer.

The renderLayer function returns a deck.gl BitmapLayer as per the deck.gl documentation (BitmapLayer Docs). Example implementation:

renderLayer() {
  return [
    new BitmapLayer({
      id: `${this.id}-bitmap-layer`,
      bounds: [-122.519, 37.7045, -122.355, 37.829],
      image:
        'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-districts.png',
      pickable: true,
    }),
  ];
}

The custom layer is properly imported and registered in layers/index.ts and layers.ts with all required constants and types and can be seen in the drop-down.

Issue

When this layer is selected in the demo app:

  • I added one log in constructor of the Custom Layer class and it logs confirming that the layer is mounted.
  • However, the layer does not render on the map. (assuming the renderLayer as seen above returns deck.gl's code)

Requests

  • Are there any specific steps or documentation on adding custom layers (e.g., image layers) to kepler.gl?
  • Is there a known issue or additional configuration required to render custom layers?
@Daim-Nickel-Penny Daim-Nickel-Penny added the bug Something isn't working label Dec 31, 2024
@AlfredoRuizXcaliburmp
Copy link

renderLayer es de Deck.gl, no de Kepler.gl.

@igorDykhta igorDykhta self-assigned this Jan 7, 2025
@igorDykhta
Copy link
Collaborator

Here is an example of a custom layer, but the PR is huge: vector tile layer alpha version
I ran some tests to render TileLayer and BitmapLayer and everything worked as expected.

Something is wrong with your setup, but it's hard to tell what without access to your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants