Coder Social home page Coder Social logo

nagyistge / tangram.cartodb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cartodb/tangram.cartodb

0.0 2.0 0.0 1.62 MB

A library to render in webgl vector tiles in cartodb.js

License: BSD 3-Clause "New" or "Revised" License

CSS 10.96% JavaScript 76.38% HTML 12.66%

tangram.cartodb's Introduction

Tangram.cartodb build

Uniform style

Installation & usage

me$ npm i tangram-cartocss
// or
me$ yarn add tangram-cartocss
import TC from 'tangram.cartodb';

API

TC constructor

new TC

/**
 * Cartodb api to handle tangram maps.
 * @param  {LeafletMap} map   object with a leaflet map instance
 * @return {TangramScene}     return a Tangram wrapper with a complete api for cartodb.js
 */

var tangramScene = new TC(map);

.addLayer

/**
 * Add a layer to Tangram instance.
 * @param  {Object} layer   layer object model
 */
tangramScene.addLayer(layer);

.addDataSource

/**
 * Add a dataSource to Tangram instance.
 * @param  {String} url   tile url generated by cartodb.js
 */
tangramScene.addDataSource('http://flo.localhost.lan:8181/api/v1/map/flo@4d30aeba@77e23386655d49f11e3cc4e729105014:1478776666976/{sourceLayers}/{z}/{x}/{y}.png');

Contributing

me$ git clone $repo_url
cd into_folder
yarn
yarn start

It will print the dev url to try the demos.

[0001] info  Server running at http://192.168.0.12:8000/ (connect)
[0001] info  LiveReload running on 35729
[0003] 43ms       1115B GET    200 /
[0003] 7ms         886B GET    200 /demos/css/main.css
[0004] 220ms       12KB GET    200 /demos/main.js

We use ES6 and Node > 6.X, I'm using 7.0 right now.

tangram.cartodb's People

Contributors

donflopez avatar

Watchers

 avatar  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.