Select to view content in your preferred language

Temporal data supported by Vector Tile Layer?

431
0
01-25-2022 04:12 AM
Labels (2)
JesusMartinBerlanga
New Contributor

I want to display weather data that changes over time in vector format from our own vector tile server and I am trying to understand the ESRI javascript API and the Mapbox vector tiles.

The example to use a VectorTileLayer is easy to understand but I do not see any argument to specify the temporal extent. The only way I see to specify the date would be in the customParameters attribute but I think that is not well supported.

 

const layer = new VectorTileLayer({
      url: "https://myserver.com/rest/services/Weather_Data_VTL/VectorTileServer/"
  customParameters: {
   date_time: "2021-01-01T0Z",
   access_token: "access-token"
  }
});

 

 

For example, the CSVLayer can have a timeInfo attribute but I have not seen the same in the VectorTileLayer class.

 

// Create a csv layer from an online spreadsheet.
var csvLayer = new CSVLayer({
  url: "http://test.com/daily-magazines-sold-in-new-york.csv",
  timeInfo: {
    startField: "SaleDate" // The csv field contains date information.
  }
});

// Create a mapview showing sales for the last week of March 2019 only.
var view = new MapView({
  map: map,
  container: "viewDiv",
  timeExtent: {
    start: new Date("2019, 2, 24"),
    end:   new Date("2019, 2, 31")
  }
});

 

 

Whats the proper way to specify time information in a VectorTileLayer? Is that even possible? 

Thanks in advance.

0 Kudos
0 Replies