import React from 'react'; import {Source, Layer} from 'react-map-gl'; import * as constants from '../../data/constants'; /** * This function will determine the URL for the tribal tiles. * @return {string} */ export const tribalURL = (): string => { const featureTileBaseURL = constants.TILE_BASE_URL; const featureTilePath = constants.GATSBY_DATA_PIPELINE_TRIBAL_PATH; const XYZ_SUFFIX = '{z}/{x}/{y}.pbf'; return [ featureTileBaseURL, featureTilePath, process.env.GATSBY_MAP_TILES_PATH, XYZ_SUFFIX, ].join('/'); }; /** * This component will return the appropriate source and layers for the tribal layer on the * map. * * There are two use cases here, eg, when the MapBox token is or isn't provided. When the token * is not provided, the open-source map will be rendered. When the open-source map is rendered * only the interactive layers are returned from this component. The reason being is that the * other layers are supplied by he getOSBaseMap function. * * @param {string | number} selectedFeatureId * @param {MapGeoJSONFeature | undefined} selectedFeature * @return {Style} */ const MapTribalLayer = () => { return ( // In this case the MapBox token is found and ALL source(s)/layer(s) are returned. {/* Tribal layer */} {/* Tribal layer - controls the border between features */} {/* Alaska layer */} {/* Tribal labels layer */} ); }; export default MapTribalLayer;