React wrapper for Here Maps API
npm install here-maps-pathfinder



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.
It's pretty easy to install this library in your react app,
npm install rc-here-maps
Copy the following snippet and paste it in your html file,
``html
`
You can see the demo of this library here
`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 (
strokeColor="#HexCode"
lineWidth={3}
onPolylineDrawn={this.onPolylineDrawn}
/>
fillColor="#HexCode"
strokeColor="#HexCode"
lineWidth={3}
onPolylineDrawn={this.onPolygonDrawn}
/>
radius={1000}
fillColor="#HexCode"
strokeColor="#HexCode"
onCircleDrawn={this.onCircleDrawn}
/>
fillColor="#HexCode"
strokeColor="#HexCode"
onRectangleDrawn={this.onRectangleDrawn}
/>
style={{
lineWidth: 10,
strokeColor: 'rgba(220, 220, 0, 0.9)',
}}
/>
export default MapDemo;
``
You can view the documentation here
Feel free to contribute to this repo by raising PR.