Code Monkey home page Code Monkey logo

leaflet-gsheets's Introduction

leaflet-gsheets

How to create a simple Leaflet web map that automatically pulls data from two simple Google Sheets tables. Sidebar created using leaflet-sidebar-v2, and Google Sheets connection with Tabletop.js.

The resultant map can be seen here: https://rdrn.me/leaflet-gsheets/

I explained the process in more length in my blog post here: Leaflet maps with data from Google Sheets.

Steps

  1. Open the following two Google Sheets and copy them to your account (top left, "Add to My Drive")
  2. In each one, do the following three steps:
    • In Google Sheets, go to File -> Publish to the Web -> Publish (and then close the dialog)
    • Then click Share in the top right -> Get Shareable Link (ensure "Anyone with the link can view" is enabled)
    • Copy the link provided and keep it aside
  3. Back in GitHub, Fork this repo (top right of this page)
  4. Either clone/download your new repo to your machine, or use GitHub's built-in code editor, and open leaflet-gsheets.js
  5. At line 20 where it says "PASTE YOUR URLs HERE", paste the URLs you copied above
  6. If you want to display your new website using GitHub Pages:
  7. Customise the Google Sheets with the data you want
  8. Customise the JavaScript however you want...

Get in touch if you need a hand!

leaflet-gsheets's People

Contributors

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