https://github.com/hentrymartin/rc-here-maps
React components implemented on top of Here Maps API
https://github.com/hentrymartin/rc-here-maps
heremaps javascript javascript-library maps reactjs wrapper
Last synced: 10 months ago
JSON representation
React components implemented on top of Here Maps API
- Host: GitHub
- URL: https://github.com/hentrymartin/rc-here-maps
- Owner: hentrymartin
- Created: 2018-09-27T06:46:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-01T11:25:31.000Z (over 7 years ago)
- Last Synced: 2025-03-18T12:58:14.778Z (about 1 year ago)
- Topics: heremaps, javascript, javascript-library, maps, reactjs, wrapper
- Language: JavaScript
- Size: 867 KB
- Stars: 15
- Watchers: 1
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RC Here Maps
[](https://semaphoreapp.com/boennemann/badges)
[](https://github.com/hentrymartin/rc-here-maps)
[](https://www.npmjs.com/package/rc-here-maps)
[](https://github.com/ellerbrock/open-source-badge/)
Here Maps provide amazing api's to add map using Javascript. This is a React wrapper for Here Maps API. Right now, this library gives functionalities like creating map and adding objects like Marker, Polygon, Polyline, Rectangle and Circle on top of it.
### How to install it
It's pretty easy to install this library in your react app,
`npm install rc-here-maps`
### Prerequisite
Copy the following snippet and paste it in your html file,
```html
```
### Demo
You can see the demo of this library [here](https://hentrymartin.github.io/rc-here-maps-example/)
### Basic Usage
```javascript
import React, { Component } from 'react';
import { HereMap, Marker, Polyline, Polygon, Circle, Rectangle, PathFinder } from 'rc-here-maps';
class MapDemo extends Component {
constructor(props) {
super(props);
this.center = {
lat: 52.51,
lng: 13.4,
};
this.bounds = {
north: 53.1,
south: 13.1,
east: 43.1,
west: 40.1,
};
}
onPolylineDrawn = () => {
console.log('polyline drawn');
};
onPolygonDrawn = () => {
console.log('Polygon drawn');
};
onCircleDrawn = () => {
console.log('circle drawn');
};
onRectangleDrawn = () => {
console.log('rectangle drawn');
};
render() {
return (
This is a sample marker
);
}
}
export default MapDemo;
```
### Documentation
You can view the documentation [here](https://github.com/hentrymartin/rc-here-maps/blob/master/DOCUMENTATION.md)
Feel free to contribute to this repo by raising PR.