| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- import React, { Component } from 'react';
- import ContentWrapper from '@/components/Layout/ContentWrapper';
- import VectorMap from '@/components/Maps/VectorMap';
- import { Container, Row, Col, Card, CardHeader, CardBody } from "reactstrap";
- const defaultColors = {
- markerColor: '#f20226',
- bgColor: 'transparent',
- scaleColors: ['#3E3A8E'],
- regionFill: '#bbbec6'
- };
- const RegionValues = {
- 'ID_su': 11100,
- 'ID_su': 111,
- 'ID_ss': 13131,
- 'ID_la': 3131,
- 'ID_be': 313,
- 'ID_bb': 3131,
- 'ID_jk': 2212,
- 'ID_jb': 99,
- 'ID_bt': 9,
- 'ID_yo': 8,
- 'ID_jt': 5,
- 'ID_jl': 1,
- 'ID_ba': 2,
- 'ID_nb': 1,
- 'ID_sg': 1,
- 'ID_sn': 1,
- 'ID_sr': 1,
- 'ID_sb': 10,
- 'ID_ri': 10,
- 'ID_kr': 10,
- 'ID_ja': 10,
- 'ID_ks': 11,
- 'ID_kb': 11,
- 'ID_ki': 11,
- 'ID_kt': 11,
- 'ID_ku': 11,
- 'ID_ma': 12,
- 'ID_mu': 12,
- 'ID_ac': 13,
- 'ID_pa': 14,
- 'ID_pb': 14,
- 'ID_nt': 15,
- 'ID_go': 16,
- 'ID_st': 16,
- 'ID_sa': 16,
- }
- const LLDIKTI = {
- 'ID_su': '<h5>LLDIKTI Wilayah I</h5>',
- 'ID_ss': '<h4>LLDIKTI Wilayah II</h4>',
- 'ID_la': '<h4>LLDIKTI Wilayah II</h4>',
- 'ID_be': '<h4>LLDIKTI Wilayah II</h4>',
- 'ID_bb': '<h4>LLDIKTI Wilayah II</h4>',
- 'ID_jk': '<h4>LLDIKTI Wilayah III</h4>',
- 'ID_jb': '<h4>LLDIKTI Wilayah IV</h4>',
- 'ID_bt': '<h4>LLDIKTI Wilayah IV</h4>',
- 'ID_yo': '<h4>LLDIKTI Wilayah V</h4>',
- 'ID_jt': '<h4>LLDIKTI Wilayah VI</h4>',
- 'ID_jl': '<h4>LLDIKTI Wilayah VII</h4>',
- 'ID_ba': '<h4>LLDIKTI Wilayah VIII</h4>',
- 'ID_nb': '<h4>LLDIKTI Wilayah VIII</h4>',
- 'ID_sg': '<h4>LLDIKTI Wilayah IX</h4>',
- 'ID_sn': '<h4>LLDIKTI Wilayah IX</h4>',
- 'ID_sr': '<h4>LLDIKTI Wilayah IX</h4>',
- 'ID_sb': '<h4>LLDIKTI Wilayah X</h4>',
- 'ID_ri': '<h4>LLDIKTI Wilayah X</h4>',
- 'ID_kr': '<h4>LLDIKTI Wilayah X</h4>',
- 'ID_ja': '<h4>LLDIKTI Wilayah X</h4>',
- 'ID_ks': '<h4>LLDIKTI Wilayah XI</h4>',
- 'ID_kb': '<h4>LLDIKTI Wilayah XI</h4>',
- 'ID_ki': '<h4>LLDIKTI Wilayah XI</h4>',
- 'ID_kt': '<h4>LLDIKTI Wilayah XI</h4>',
- 'ID_ku': '<h4>LLDIKTI Wilayah XI</h4>',
- 'ID_ma': '<h4>LLDIKTI Wilayah XII</h4>',
- 'ID_mu': '<h4>LLDIKTI Wilayah XII</h4>',
- 'ID_ac': '<h4>LLDIKTI Wilayah XIII</h4>',
- 'ID_pa': '<h4>LLDIKTI Wilayah XIV</h4>',
- 'ID_pb': '<h4>LLDIKTI Wilayah XIV</h4>',
- 'ID_nt': '<h4>LLDIKTI Wilayah XV</h4>',
- 'ID_go': '<h4>LLDIKTI Wilayah XVI</h4>',
- 'ID_st': '<h4>LLDIKTI Wilayah XVI</h4>',
- 'ID_sa': '<h4>LLDIKTI Wilayah XVI</h4>',
- }
- class Maps extends Component {
- state = {
- series: {
- regions: [{
- values: RegionValues,
- scale: defaultColors.scaleColors,
- normalizeFunction: 'polynomial'
- }]
- },
- markers: [
- // { latLng: [0.293347, 101.706825], name: 'aceh' },
- // { latLng: [4.695135, 96.749397], name: 'ID_ac' },
- // { latLng: [-0.52, 166.93], name: 'Nauru' },
- // { latLng: [-8.51, 179.21], name: 'Tuvalu' },
- // { latLng: [7.11, 171.06], name: 'Marshall Islands' },
- // { latLng: [17.3, -62.73], name: 'Saint Kitts and Nevis' },
- // { latLng: [3.2, 73.22], name: 'Maldives' },
- // { latLng: [35.88, 14.5], name: 'Malta' },
- // { latLng: [41.0, -71.06], name: 'New England' },
- // { latLng: [12.05, -61.75], name: 'Grenada' },
- // { latLng: [13.16, -59.55], name: 'Barbados' },
- // { latLng: [17.11, -61.85], name: 'Antigua and Barbuda' },
- // { latLng: [-4.61, 55.45], name: 'Seychelles' },
- // { latLng: [7.35, 134.46], name: 'Palau' },
- // { latLng: [42.5, 1.51], name: 'Andorra' }
- ],
- options: {
- map: 'id_ID',
- backgroundColor: defaultColors.bgColor,
- zoomMin: 1,
- zoomMax: 8,
- zoomOnScroll: true,
- regionStyle: {
- initial: {
- 'fill': defaultColors.regionFill,
- 'fill-opacity': 1,
- 'stroke': 'none',
- 'stroke-width': 1.5,
- 'stroke-opacity': 1
- },
- hover: {
- 'fill-opacity': 0.8
- },
- selected: {
- fill: 'blue'
- },
- selectedHover: {}
- },
- focusOn: {
- x: 0.4,
- y: 0.6,
- scale: 1
- },
- markerStyle: {
- initial: {
- fill: defaultColors.markerColor,
- stroke: defaultColors.markerColor
- }
- },
- onRegionLabelShow: (e, el, code) => {
- if (RegionValues[code])
- el.html(LLDIKTI[code] + el.html() + ' : ' + RegionValues[code] + ' pelaporan');
- }
- }
- }
- render() {
- return (
- <Card className="card-default">
- <CardBody>
- <VectorMap height="370px" options={this.state.options} series={this.state.series} markers={this.state.markers} />
- </CardBody>
- <div align="center">
- <span>Peta Geografis Wilayah LLDikti</span>
- </div>
- </Card>
- );
- }
- }
- export default Maps;
|