API & Client - tile server for map can be changed - fix #54
This commit is contained in:
@ -4,7 +4,7 @@ import { GeoJSON, Map, Marker, TileLayer } from 'react-leaflet'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
import { getActivityGpx, getSegmentGpx } from '../../../actions/activities'
|
||||
import { thunderforestApiKey } from '../../../utils'
|
||||
import { apiUrl } from '../../../utils'
|
||||
import { getGeoJson } from '../../../utils/activities'
|
||||
|
||||
class ActivityMap extends React.Component {
|
||||
@ -62,8 +62,8 @@ class ActivityMap extends React.Component {
|
||||
<TileLayer
|
||||
// eslint-disable-next-line max-len
|
||||
attribution='© <a href="http://www.thunderforest.com/">Thunderforest</a>, © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
// eslint-disable-next-line max-len
|
||||
url={`https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=${thunderforestApiKey}`}
|
||||
url={`${apiUrl}activities/map_tile/{s}/{z}/{x}/{y}.png`}
|
||||
|
||||
/>
|
||||
<GeoJSON
|
||||
// hash as a key to force re-rendering
|
||||
|
@ -19,10 +19,6 @@ export const getFileSizeInMB = fileSize => {
|
||||
|
||||
export const version = '0.3.0-beta' // version stored in 'utils' for now
|
||||
export const apiUrl = `${process.env.REACT_APP_API_URL}/api/`
|
||||
/* prettier-ignore */
|
||||
export const thunderforestApiKey = `${
|
||||
process.env.REACT_APP_THUNDERFOREST_API_KEY
|
||||
}`
|
||||
|
||||
export const userFilters = [
|
||||
{ key: 'activities_count', label: 'activities count' },
|
||||
|
Reference in New Issue
Block a user