RC Here Maps
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,
Demo
You can see the demo of this library here
Basic Usage
;; { superprops; thiscenter = lat: 5251 lng: 134 ; thisbounds = north: 531 south: 131 east: 431 west: 401 ; } { console; }; { console; }; { console; }; { console; }; { return <div className="map-wrapper"> <HereMap appId="YYYY" appCode="XXXX" useHTTPS=false center=thiscenter> <Marker lat=5221 lng=4812> This is a sample marker </Marker> <Polyline dataPoints=52 48 100 42 77 100 strokeColor="#HexCode" lineWidth=3 onPolylineDrawn=thisonPolylineDrawn /> <Polygon dataPoints=52 48 100 42 77 100 fillColor="#HexCode" strokeColor="#HexCode" lineWidth=3 onPolylineDrawn=thisonPolygonDrawn /> <Circle center=thiscenter radius=1000 fillColor="#HexCode" strokeColor="#HexCode" onCircleDrawn=thisonCircleDrawn /> <Rectangle bounds=thisbounds fillColor="#HexCode" strokeColor="#HexCode" onRectangleDrawn=thisonRectangleDrawn /> <PathFinder waypoints= lat: 52516 lng: 133779 lat: 525206 lng: 133862 /> <PathFinder waypoints= lat: 52516 lng: 133779 lat: 52518 lng: 134062 lat: 52519 lng: 134162 style= lineWidth: 10 strokeColor: 'rgba(220, 220, 0, 0.9)' /> </HereMap> </div> ; } ;
Documentation
You can view the documentation here
Feel free to contribute to this repo by raising PR.