Giter VIP home page Giter VIP logo

static-map-template's Introduction

##Create static maps with D3

Convert your map into .svg for printing. Actually it works with anything (not animated) you do with D3.

####Examples Map of the Philippines

Map of Europe

##How to use it

You need to have nodeJS installed.

####Copy this repository

    git clone https://github.com/idris-maps/Static-map-template.git

####Check if you have watchify installed

      watchify --version

If not, install it (you may need to be su to run this one):

    npm install watchify -g

####Install the libraries:

    npm install

This will install D3, express (the server so you can see your work in progress in the browser) and node-jsdom (to savethe .svg file)

####Run the server and watch your scripts for modification

    npm run show

The server runs on port 3000. If you wish to change that you can do so in the 'server.js' file. Check if it works in the browser at http://localhost:3000/ . You should see the word 'template'

#####Set the size of your desired output in 'lib/config.js'

#####Write your map or graph in 'lib/draw.js'

#####When you are satisfied with your map, run

    node saveSvg

in the main folder to create a 'map.svg' file.

static-map-template's People

Contributors

idris-maps 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.