@nteract/transform-geojson
v5.1.13
Published
GeoJSON Transform
Downloads
986
Maintainers
Keywords
Readme
@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.