TomTom Maps for JavaScript
    Preparing search index...

    Type Alias DeriveDatasetsParams

    DeriveDatasetsParams: SomeMultiInputIds & {
        code: string;
        connectMarkerType?: Exclude<PlacesMarkerType, "pin-clustered">;
        datasetId?: string;
        keepEmpty?: boolean;
        keepHistory?: boolean;
        label?: string;
        operation?: string;
        persist: typeof PERSIST_VALUES[number];
        show?: {
            customGeometries?: z.infer<typeof showProducedGeometriesSchema>;
            places?: z.infer<typeof showPlacesSchema>;
            placesGeometries?: z.infer<typeof showPlacesGeometriesSchema>;
        };
    }

    A derived dataset for deriveDatasets: the datasets its code reads, one *DatasetIDs field per kind and at least one of them, the code, and what happens to the new dataset after the run.

    Type Declaration

    • code: string

      Sandbox JS returning { places?, placeConnections?, geometries?, fitOnMap?, byod? }. It reads the datasets as the deriveDatasets tool's code does, such as byodByDataset[id] for a BYOD dataset.

    • OptionalconnectMarkerType?: Exclude<PlacesMarkerType, "pin-clustered">

      Which places module draws placeConnections. Default: 'pin'.

    • OptionaldatasetId?: string

      The new dataset's id, suffixed on collision. Default: the slice's next id, such as byod-3. The id of a dataset written with persist: 'monitor' rewrites that dataset in place instead, when the code returns its kind.

    • OptionalkeepEmpty?: boolean

      With persist: 'monitor', writes the dataset and keeps it live even when this run keeps no feature, as when none matches yet: the code returned its places, geometries or byod empty. The dataset fills as its sources change, a history starts at zero, the first run that writes features sets what drift is measured against, and an empty run is never a drift. Without it, or when the run can't follow its sources, such a run writes nothing and errors. A revision that may come back empty sets it too.

    • OptionalkeepHistory?: boolean

      With persist: 'monitor', also keeps the BYOD dataset <datasetId>_history, which historyDatasetId in the result names, so the agent reads how the dataset evolved with analyseDatasets or watches it with createEventRule.

      • One feature per run: at (ISO), features (the count) and the total of each numeric property, over 6 hours of source-data time and at most 360 samples. A run within 20 seconds of the last replaces it.
      • It goes when the dataset stops being kept live, though not while paused. A revision, paused or not, keeps it under the same id and starts its samples afresh, unless the revision sets keepHistory: false.
      • It needs the BYOD slice in multiple mode, its default, and stops sampling in single mode. None is kept when another dataset, such as one your app added, already holds <datasetId>_history.
    • Optionallabel?: string

      Short label for the new dataset.

    • Optionaloperation?: string

      Provenance label, such as buffer, stored on a new custom-geometries dataset.

    • persist: typeof PERSIST_VALUES[number]

      'none' writes the dataset once; 'monitor' also re-derives it in place whenever a source dataset changes, when monitoring: true in the result says the run can follow its sources.

    • Optionalshow?: {
          customGeometries?: z.infer<typeof showProducedGeometriesSchema>;
          places?: z.infer<typeof showPlacesSchema>;
          placesGeometries?: z.infer<typeof showPlacesGeometriesSchema>;
      }

      How to render the new dataset, by what the code returned. Default: not shown.