Closed scadergit closed 3 years ago
Hello @scadergit , with vector sources you can define append custom get parameters to the url string. Or generate url dynamically in runtime with url function, just replace url property with a function:
(extent, resolution, projection) => {
// build url string
return url
}
Or finally provide custom loader function:
async (extent, resolution, projection) => {
const r = await fetch('//path/to/features')
const data = await r.text()
// if returned features data is known gis format
// and you set this format factory to the vl-source-vector
// you can just return raw data here
return data
// or parse raw data yourself, then return GeoJSONFeature[] or ol/Feature[]
return features
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Unless I'm missing the implementation, I don't see the ability to add parameters to vector-source service requests in the way that wms-source can using extParams. We have to provide an a token to certain service requests, and cannot without this feature for vector sources.
Appreciate the help.