Giter Site home page Giter Site logo

higlass-geojson's Introduction

GeoJSON Track for HiGlass

Display your favorite GeoJSON annotation right in HiGlass.

HiGlass Build Status code style prettier

HiGlass showing ski areas with Mapbox

Note: This is the source code for the GeoJSON track only! You might want to check out the following repositories as well:

HiGlass GeoJSON comes in 2 flavors, with and without including d3-geo in the bundle. The only difference is the file size:

  • With d3-geo: 8KB minified and gzipped
  • Without d3-geo: 2KB minified and gzipped

Installation

npm install higlass-geojson

Usage

  1. Make sure you load this track prior to hglib.js. For example:
<script src="higlass-geojson.js"></script>
<script src="hglib.js"></script>
<script>
  ...
</script>
  1. Now, configure the track in your view config and be happy! Cheers ๐ŸŽ‰
{
  ...
  {
    server: 'http://localhost:8001/api/v1',
    tilesetUid: 'my-outrageously-fancy-geojson-db',
    uid: 'my-outrageously-fancy-geojson-db',
    type: 'geo-json',
    options: {
      labelColor: 'red',
      labelPosition: 'hidden',
      trackBorderWidth: 0,
      trackBorderColor: 'red',
      rectangleDomainFillColor: 'red',
      rectangleDomainFillOpacity: 0.25,
      rectangleDomainStrokeColor: 'red',
      rectangleDomainOpacity: 1,
      rectanlgeMinSize: 3,
      minSquareSize: 4,
      polygonMinBoundingSize: 5,
      name: 'My Outrageously Fancy GeoJSON Stuff - Truly Awesome',
    },
  },
  ...
}

Take a look at src/index.html for an example.

Development

Installation

$ git clone https://github.com/flekschas/higlass-geojson && higlass-geojson
$ npm install

Commands

Developmental server: npm start Production build: npm run build

higlass-geojson's People

Contributors

flekschas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

higlass

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.