0.1.4 • Published 4 years ago

react-mapgl-with-deck-geojson-components v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

React-Mapgl-with-deck-geojson-components

This provides a simple implementation of React-Map-GL with a GeoJson layer created by deck.gl

All the components use React Hooks.

Note:

You will need to add the follwing line to your index.html <link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.6.0/mapbox-gl.css" rel="stylesheet"/>

Props:

You can pass the follwing props to MapComponent.

    mapboxApiAccessToken: string
    mapStyle: string
    geojson?: FeatureCollection
    latitude?: number
    longitude?: number
    width?: number
    height?: number

###Example: Only mapboxApiAccessToken and mapStyle is required to create a simple map. You can pass geojson linestring as a GeoJSON FeatureCollection to view the line.

let map_comp_props = {
    mapboxApiAccessToken: YOUR_MAPBOX_API_KEY,
    mapStyle: "mapbox://styles/mapbox/light-v10" 
}
<MapComponent {...map_comp_props}/>
0.1.4

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.0.10

6 years ago

0.1.0

6 years ago

0.1.1

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.5

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.4

6 years ago

0.0.1

6 years ago