@nteract/transform-geojson
TypeScript icon, indicating that this package has built-in type declarations

5.1.13 • Public • Published

@nteract/transform-geojson

This package contains a React component that renders GeoJSON data into interactive maps using Leaflet.

Installation

$ yarn add @nteract/transform-geojson
$ npm install --save @nteract/transform-geojson

Usage

The example below shows how we can use the transform to render two coordinates on a map with a pop-up.

import GeoJSONTransform from "@nteract/transform-geojson";

export default () => {
  return (
    <GeoJSONTransform
      data={{
        type: "FeatureCollection",
        features: [
          {
            type: "Feature",
            properties: {
              popupContent: "18th & California Light Rail Stop"
            },
            geometry: {
              type: "Point",
              coordinates: [-104.98999178409576, 39.74683938093904]
            }
          },
          {
            type: "Feature",
            properties: {
              popupContent: "20th & Welton Light Rail Stop"
            },
            geometry: {
              type: "Point",
              coordinates: [-104.98689115047453, 39.747924136466565]
            }
          }
        ]
      }}
      metadata={true}
    />
  );
};

Documentation

We're working on adding more documentation for this component. Stay tuned by watching this repository!

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:transform-geojson label.

License

BSD-3-Clause

Readme

Keywords

none

Package Sidebar

Install

npm i @nteract/transform-geojson

Weekly Downloads

618

Version

5.1.13

License

BSD-3-Clause

Unpacked Size

214 kB

Total Files

12

Last publish

Collaborators

  • hydrosquall
  • benabel
  • alexandercbooth
  • benrussert
  • mpacer
  • theengineear
  • yuvipanda
  • rgbkrk
  • lgeiger
  • ivanov
  • captainsafia
  • peggyrayzis
  • jdetle
  • hasch
  • willingc
  • stormpython
  • crystalline-cat
  • emeeks