andrej-ipr-simple-map
Version:
39 lines (34 loc) • 810 B
JSX
import React, { Component } from 'react';
import { WebMap } from 'react-arcgis';
export default class Map extends Component {
constructor(props) {
super(props);
console.log(props);
this.state = {
};
}
render() {
const { viewId, children, onMapLoad} = this.props;
return (
<span>
<WebMap
id={viewId}
style={styles.mapContainer}
onLoad={onMapLoad}
>
{children}
</WebMap>
</span>
);
}
}
const styles = {
title: {
fontSize: 60,
color: 'red'
},
mapContainer: {
width: '100%',
height: '80vh'
}
}