0.0.14 • Published 11 months ago
rousen-react v0.0.14
Rousen React
Rousen react is a openlayers-based react library for maps. It provides various features related to maps and can be used on different platforms such as Google Maps, Naver Maps, Kakao Maps, etc.
Features
Works with your Components
You can render your cool animated react components on the map.
Installation
npm install --save rousen-react
Getting started
1. Creating a Map
You can create a map using Map Component
center
: latitude and longitude of the map center.zoom
: map zoom level
import React from "react";
import { Map } from "rousen-react";
const App = () => {
return (
<div style={{ width: "100%", height: "400px" }}>
<Map center={{ lon: 127.0802159, lat: 37.5383777 }} zoom={11}>
<TileLayer
crossOrigin="anonymous"
url="https://tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
</Map>
</div>
);
};
export default App;
API
components
utilities
fitMap()
searchPlacesbyText()
searchPlacesbyLocation()
locationToAddress()
addressToLocation()
getRoute()
Contributing
rousen-react is an open source project and contributions are always welcome. If you have any suggestions or find a bug, please create an issue or pull request.