kibana/x-pack/examples/third_party_maps_source_example
Nathan Reese 2fb4d5fff8
[maps] remove IVectorSource.getFieldNames (#159747)
`IVectorSource` interface has many similar sounding methods that are
used for different purposes. These lead to confusion and an unclear API
* getFieldNames
* getFields
* getFieldByName

Although `getFieldNames` sounds similar to `getFields`, the 2 are used
for very different purposes.
* getFieldNames returns a string array that is used to trigger source
re-fetch
* getFields returns an array of fields to drive UI such as field
selection for data driven styling

`getFieldNames` overlaps 100% in functionality with `getSyncMeta` and is
not needed. Combining output of `getFieldNames` into `getSyncMeta`
simplifies the `IVectorSource` API and removes some confusion.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-27 11:36:43 -06:00
..
common [Maps] Custom raster source example plugin (#136761) 2022-07-26 14:41:45 -07:00
public [maps] remove IVectorSource.getFieldNames (#159747) 2023-06-27 11:36:43 -06:00
kibana.jsonc [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.md [Maps] Custom raster source example plugin (#136761) 2022-07-26 14:41:45 -07:00
tsconfig.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00

Third party maps source example plugin

An example plugin for a custom raster tile source in Maps.

This example plugin uses a time-enabled radar imagery service from the U.S. National Weather Service. The service URL contains a {time} template field that is populated as Unix time from the Kibana time picker. The time slider in Maps can also be used to animate the service.

Demo

  1. Open a new Map and modify the time picker to the "Last 2 hours".
  2. Click "Add layer" and choose "Weather" to add the layer to the map.
  3. You should see current precipitation models over the U.S.
  4. Use the timeslider to animate the radar model.

Development

See the kibana contributing guide for instructions setting up your development environment.