如何每30分钟在TileLayer(React Leaflet)中申请新的瓷砖?

时间:2017-05-06 15:29:22

标签: reactjs leaflet mapbox

这就是我所拥有的:

const RL = require('react-leaflet');
var Map = RL.Map;
var TileLayer = RL.TileLayer;

<Map
  zoom={14}
  zoomSnap={0}
  style={{height: "100%"}}
  ref={(map) => { this.map = map; }}
>
  <TileLayer url={`https://api.mapbox.com/styles/v1/${process.env.MAPBOX_URL}/tiles/256/{z}/{x}/{y}@2x?fresh=true&access_token=${process.env.MAPBOX_API}`}/>

但我无法弄清楚如何每隔30分钟申请新的瓷砖?我需要它来显示更新的交通信息......

0 个答案:

没有答案