0.1.4 • Published 3 years ago

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

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.0.10

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago