1.2.1 • Published 5 years ago
react-atlas-map v1.2.1
react-atlas-map
atlas map using react
Install
npm install --save react-atlas-mapUsage
import React, { Component } from 'react'
import Atlas from 'react-atlas-map'
import MapRegion from "./map/mymap.geojson";
import 'react-atlas-map/dist/index.css'
class Example extends Component {
render() {
return <Atlas
mapData={MapRegion}
detailValue='BLOK'
properties={[]}
center={[109.318622, 1.03847]}
zoom={5}
width={700}
height={300}
autoWidth
/>
}
}Properties
mapData
for bound data mask, must geojson file type.
properties
for data marker showing on map. must be array data type with format:
[{
longitude: logitude,
latitude: latitude,
description: description,
icon: image url location
}]detailValue
for showUp Detail properties value.
autoWidth
for auto fix width with browser.
center
for center to coordinate Lat,Long.
License
MIT © Riady Santoso