question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs/Examples for how addLayer works

See original GitHub issue

Is your feature request related to a problem? Please describe. There are examples provided on how to update the map config as well as add a new dataset, but it’s not really clear what the props look like for addLayer. So if we want to add mutiple layers for a dataset, how could one go about it?

Describe the solution you’d like Some more dev focused examples and tutorials on how to add, remove, and update layers using JS instead of the UI.

Describe alternatives you’ve considered I have not considered alternatives. Kepler seems pretty robust, but I feel like there are a few examples missing when it comes to API usage. Like with the layer props there doesn’t seem to be much on what a KeplerJson dataset can look like/contain, or what all the fields for a config object are. I’m just not sure what exactly Kepler is capable of outside what I can glean from examples.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
heshan0131commented, Jun 7, 2019

@Harrisandwich I agree the API is missing when it comes to how to programmatically interact with layers and filters in kepler.gl. Although the necessary function is exported is there, we just have to surface it in our API design.

currently addLayer only add an empty layer without a specific type, you can pass in label, color columns, isVisible: true, to set a type to it you will have to call layerTypeCange, the design here is the reflect how user interact with kepler UI. They first click on add layer button then select a type, and select columns

If you want to programmatically create layers without have to click kepler.gl UI, the best way is to call addDataToMap and pass in the layer config

0reactions
macrigiuseppecommented, Jun 21, 2019

Closing for no activity

Read more comments on GitHub >

github_iconTop Results From Across the Web

Map.addLayer - Earth Engine - Google Developers
addLayer. Stay organized with collections Save and categorize content based on your preferences. Adds a given EE object to the map as a...
Read more >
How to add google maps as a layer in Esri Javascript API??
Hi, I'm referencing the following webpage: http://gmaps-utility-gis.googlecode.com/svn-history/r275/trunk/gmapslayer/docs/examples.html and ...
Read more >
AddLayer—ArcMap | Documentation
AddLayer is an easy way to add a layer or group layer into a map document. It can add a layer with auto-arrange...
Read more >
Map.addLayer() -- client or server side?? Google Earth Engine
How does Map.addLayer work? This is what I think happens: Map.addLayer gets the bounds and scale of the Map (client side), sends an...
Read more >
AddLayer—Python in ArcGIS Notebook Server
AddLayer is an easy way to add a layer or group layer into a map document. ... layer in a data frame similarly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found