{"size": 481, "ext": "js", "max_stars_repo_path": "src/spatial/components/layer/VectorTile.js", "max_stars_repo_name": "beneke090/tree-app", "max_stars_repo_stars_event_min_datetime": "2019-06-28T06:42:11.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-19T11:01:37.000Z", "max_issues_repo_path": "src/spatial/components/layer/VectorTile.js", "max_issues_repo_name": "beneke090/tree-app", "max_issues_repo_issues_event_min_datetime": "2019-07-11T05:58:09.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T08:17:40.000Z", "max_forks_repo_path": "src/spatial/components/layer/VectorTile.js", "max_forks_repo_name": "beneke090/tree-app", "max_forks_repo_forks_event_min_datetime": "2019-08-06T10:02:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-15T15:36:01.000Z"}
{"max_stars_count": 4, "max_issues_count": 592, "max_forks_count": 4, "avg_line_length": 24.05, "max_line_length": 64, "alphanum_fraction": 0.7006237006}
import OLVectorTile from 'ol/layer/VectorTile';
import PropTypes from 'prop-types';
import React, { useMemo } from 'react';

import Base from './Base';

function VectorTile({ children, ...props }) {
  const layer = useMemo(() => new OLVectorTile(props), [props]);
  return <Base layer={layer}>{children}</Base>;
}

VectorTile.propTypes = {
  children: PropTypes.oneOfType([
    PropTypes.arrayOf(PropTypes.node),
    PropTypes.node,
  ]).isRequired,
};

export default VectorTile;
