Giter Site home page Giter Site logo

geoverview's Introduction

logo

npm jsdeliver license code size

Based on maplibre-gl, geoverview is a tool for giving a quick and easy geographic overview of any geojson (and the information it contains). Geoverview is particularly suitable for working within Observable.

geoverview

How to use?

It is very simple, geoverview contains only one function. In Observable, it is used in the following way. You need 3 cells:

// Load geoverview
view = require("[email protected]").then((f) => f.view)
// add a geojson (or topojson) file
data = FileAttachment("something.geojson").json()
// and view
view(data)

Automatically, the map and your geojson will be displayed. So simple...

Demo

Live demo on this page or this Observable notebook.

Options

You can add some options like this:

view(data, {width:800, renderWorldCopies:false})

Option list:

  • width: width of the map (default: 1000)
  • height: height of the map (default: 550)
  • col: Color of the displayed geojson (default: "#be82c2")
  • fillOpacity: fill opacity (default: 0.5)
  • lineWidth: line thickness (default 1 if point or polygon, 3 if line)
  • colOver: color when an object is hovered (default: "#ffd505")
  • renderWorldCopies: If true , multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude (default: true)
  • style: basemap style: "night", "fulldark", "voyager","positron","icgc","osmbright","hibrid" (default: voyager)

Things to fix/improve

  • Add an example that works outside of Observable (#1)
  • In Quarto, the rendering of the infoboxes is not good. Css problem? (#2)

See all issues.

Contribute

If you want to improve geoverview, feel free to post issues (bugs, suggestions...) and suggest pull requests.

geoverview's People

Contributors

neocarto avatar

Stargazers

Arnaud Feldmann avatar  avatar Vinod Pahuja avatar Till Krenz avatar Kyle Barron avatar Andrew Duberstein avatar Paul-Antoine avatar Alex Yule avatar Thomas Gratier avatar James Gordon avatar  avatar Alok Pepakayala avatar  avatar  avatar Juan Luis Cano Rodríguez avatar shadet avatar Benjamin Becquet avatar Jean-Marie Arsac avatar  avatar Cedric Rossi avatar Xavier Olive avatar Jacob Wasilkowski avatar David Brochart avatar Taras Novak avatar

Watchers

James Cloos avatar Jean-Marie Arsac avatar  avatar  avatar  avatar  avatar

Forkers

mapmyworld

geoverview's Issues

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.