https://github.com/cedarstudios/cedarmaps-react-sdk
Interactive, thoroughly customizable maps in React applications, powered by vector tiles.
https://github.com/cedarstudios/cedarmaps-react-sdk
Last synced: 9 months ago
JSON representation
Interactive, thoroughly customizable maps in React applications, powered by vector tiles.
- Host: GitHub
- URL: https://github.com/cedarstudios/cedarmaps-react-sdk
- Owner: cedarstudios
- Created: 2019-01-30T13:11:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T10:54:03.000Z (over 4 years ago)
- Last Synced: 2025-01-09T10:27:32.196Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://cedarmaps.com
- Size: 243 KB
- Stars: 3
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CedarMaps SDK for React
## What is CedarMaps?
CedarMaps is the location data platform for mobile and web applications. We provide [building blocks](https://www.cedarmaps.com) to add location features like maps, search, and navigation into any experience you create. Use our simple and powerful APIs & SDKs and our open source libraries for interactivity and control.
## Sign up for CedarMaps
Not a CedarMaps user yet? [Sign up for an account here](https://www.cedarmaps.com/#demo). Once you’re signed in, all you need to start building is a CedarMaps access token.
---
This guide will take you through the process of integrating CedarMaps into your React application.
This package is a wrapper over [react-mapbox-gl](https://github.com/alex3165/react-mapbox-gl) library.
## Table of Contents
- [Installation](#installation)
- [Rendering Component](#rendering-component)
- [Adding Markers](#adding-markers)
- [Example](#example)
## Installation
**Npm**
```
npm install @cedarstudios/react-cedarmaps --save
```
**Yarn**
```
yarn add @cedarstudios/react-cedarmaps
```
## Rendering Component
```js
import CedarMaps from '@cedarstudios/react-cedarmaps'
```
```js
render() {
return {
}
}
```
### Adding Markers
Get `ReactMapboxGl` object and start adding Markers, Polylines or other controls.
```js
const {RotationControl, ZoomControl, ScaleControl} = CedarMaps.getReactMapboxGl()
return (
)
```
You can read more about `ReactMapboxGl` in [Mapbox Documentation](https://github.com/alex3165/react-mapbox-gl/blob/master/docs/API.md)
## Example
You can consult [this example](https://github.com/cedarstudios/cedarmaps-react-sdk/tree/master/example) for getting acquainted with our package.