import { GeometryKind , GeometryKindSet } from "@here/harp-datasource-protocol" ; import * as THREE from "three" ; import { MapObjectAdapter , MapObjectAdapterParams } from "../MapObjectAdapter" ; import { Tile } from "../Tile" ; param tile - The  Tile to add the object to.
 *  param object param geometryKind param mapAdapterParams export function registerTileObject ( tile , object , geometryKind , mapAdapterParams ? ) { const kind = geometryKind instanceof Set ? Array . from ( ( geometryKind as GeometryKindSet ) . values ( ) ) : Array . isArray ( geometryKind ) ? geometryKind : [ geometryKind ] ; MapObjectAdapter . create ( object , { dataSource : tile . dataSource , kind , level : tile . tileKey . level , ... mapAdapterParams } ) ; if ( object . userData === undefined ) { object . userData = { } ; } const userData = object . userData ; userData . tileKey = tile . tileKey ; userData . dataSource = tile . dataSource . name ; userData . kind = kind ; tile . resetVisibilityCounter ( ) ; }