Giter VIP home page Giter VIP logo

labs-multilayer's Introduction

Toggle layers in CartoDB

Multilayer is achieved through an angularjs-based selector (to keep HTML as clean and self-contained as possible) and a basemap-agnostic (i.e. it works with Leaflet, Google maps or whatever) logic.

One layer per visualization and one visualization per layer.

Example URL:

http://multilayer.cartodb.io/multilayer.html?u=dcarrion&t=multilayer&v=9c5ed27c-ad4f-11e4-ae79-0e853d047bba&tt=Multilayer%20map&d=Description%20test

URL params:

  • u: username
  • t: table with the layers
  • v: viz.json UUID for the basemap (this visualization may contain data as well, but please remember this layer is not included in the selector and can't be hidden)
  • tt: Title of the map
  • d: Description - Keep it short!

Required row fields in the layer table:

  • cartodb_id: not used
  • the_geom: not_used
  • name: name to appear in the selector
  • show: true if layer is to be displayed initially
  • viz_json: URL for the viz.json that corresponds to the visualization (takes precedence over sql and cartocss)
  • sql: SQL query for the data in the layer (used if viz_json is not present)
  • sql_user: user name for the SQL query (used if viz_json is not present)
  • cartocss: CartoCSS for the layer (used if viz_json is not present)
  • interactivity: Fields to interact with for the layer (used if viz_json is not present)
  • created_at: not used
  • modified_at: not used

labs-multilayer's People

Contributors

saleiva avatar andrewbt avatar danicarrion avatar mansonp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.