XYZ Maps Documentation
    Preparing search index...

    Class IMLProvider

    An IMLProvider is a remote HTTPProvider designed to work with HERE Interactive Map layer.

    Hierarchy (View Summary)

    Index
    • Parameters

      Returns IMLProvider

      const provider = new IMLProvider({
      level: 10,
      layer: 'boston-liquor',
      catalog: 'hrn:here:data::olp-here:dh-showcase',
      credentials: {
      apiKey: "YOUR_API_KEY",
      }
      });

      To decode model assets off the main thread, use a standalone worker preprocessor. The function must return the feature array; it cannot use closures or the DOM. Worker mode automatically selects a worker loader with one worker per provider. Each LoaderManager allows up to 16 concurrent tile tasks, including download and preprocessing. Started preprocessing cannot be cancelled; late results of cancelled requests are ignored. Main-thread preprocessors may use ready; worker preprocessors must return the array or a Promise of it. Use PreProcessorOptions with optional worker and main phases (one stage or arrays): worker stages share the download worker and transfer only their final result, then main stages run sequentially before ingestion. Empty phases are identity; worker phases require automatic HTTP loading. The example assumes features already contain an OBJ modelSource with OBJ/MTL assets. tgaGzipBase64 maps exact MTL map_Kd texture filenames (for example, "facade.tga") to base64-encoded gzip TGA assets. The utilities decode these into ModelTextureData; existing model assets and textures are preserved.

      const provider = new IMLProvider({
      level: 10,
      layer: 'models',
      catalog: 'hrn:here:data::example:catalog',
      credentials: {apiKey: 'YOUR_API_KEY'},
      preProcessor: {
      worker: {processor: async ({data}, {utils}) => {
      for (const feature of data) {
      const {modelSource, tgaGzipBase64} = feature.properties;
      modelSource.textures ||= {};
      for (const filename of Object.keys(tgaGzipBase64)) {
      const bytes = await utils.decompress(utils.decodeBase64(tgaGzipBase64[filename]), 'gzip');
      modelSource.textures[filename] = utils.decodeTga(bytes);
      }
      delete feature.properties.tgaGzipBase64;
      }
      return data;
      }},
      main: ({data}) => data
      }
      });
    hooks?: {
        "Coordinates.update"?: CoordinatesUpdateHook | CoordinatesUpdateHook[];
        "Feature.remove"?: FeatureRemoveHook | FeatureRemoveHook[];
        "Navlink.disconnect"?: NavlinkDisconnectHook | NavlinkDisconnectHook[];
        "Navlink.split"?: NavlinkSplitHook | NavlinkSplitHook[];
    }

    Hook functions that will be called during the execution of the corresponding "editing operation". The "hooks" property is a map with the "editing operation" as its key and the corresponding Hook or Array of Hook function(s) as its value.

    Available editing operations are 'Navlink.disconnect', 'Navlink.split', 'Feature.remove', 'Coordinates.remove'.

    id?: string

    The id of the Provider

    margin?: number = 0

    default tile margin.

    name: string

    The name of the Provider.

    url: string

    Base URL of the SpaceProvider. It points to a XYZ-Hub space endpoint.

    "https://xyz.api.here.com/hub/spaces"
    
    • Add an EventListener to the provider. Valid events: "featureAdd", "featureRemove", "featureCoordinatesChange", "clear" and "error"

      The detail property of the Event gives additional information about the event. detail.provider is a reference to the provider onto which the event was dispatched and is set for all events.

      Parameters

      • type: string

        A string representing the event type to listen for

      • listener: (e: CustomEvent) => void

        the listener function that will be called when an event of the specific type occurs

      • Optional_c: any

      Returns boolean

    • Add a feature to the provider.

      Parameters

      Returns Feature

      // add a feature to the provider.
      provider.addFeature({
      type: "Feature"
      geometry: {
      coordinates: [[-122.49373, 37.78202], [-122.49263, 37.78602]],
      type: "LineString"
      }
      });
    • Add multiple features to the provider.

      Parameters

      Returns Feature<string>[]

      // add multiple features to the provider.
      provider.addFeature([{
      type: "Feature"
      geometry: {
      coordinates: [[-122.49373, 37.78202], [-122.49263, 37.78602]],
      type: "LineString"
      }
      },{
      type: "Feature"
      geometry: {
      coordinates: [[-122.49375, 37.78203], [-122.49265, 37.78604]],
      type: "LineString"
      }
      }]);
    • Add a feature to the provider.

      Parameters

      Returns any

      // add a feature to the provider.
      provider.addFeature({
      type: "Feature"
      geometry: {
      coordinates: [[-122.49373, 37.78202], [-122.49263, 37.78602]],
      type: "LineString"
      }
      });
    • Cancel ongoing request(s) of a tile. The tile will be dropped.

      Parameters

      • quadkey: string

        the quadkey of the tile that should be canceled and removed.

      Returns void

    • Cancel ongoing request(s) of a tile. The tile will be dropped.

      Parameters

      • tile: Tile

        the tile that should be canceled and removed.

      Returns void

    • Commit modified/removed features to the remote backend.

      Parameters

      • data: { put?: GeoJSONFeature<string>[]; remove?: GeoJSONFeature<string>[] }

        the data that should be commit to the remote.

        • Optionalput?: GeoJSONFeature<string>[]

          features that should be created or updated

        • Optionalremove?: GeoJSONFeature<string>[]

          features that should be removed

      • OptionalonSuccess: any

        callback function that will be called when data has been commit successfully

      • OptionalonError: any

        callback function that will be called when an error occurs

      Returns void

    • Get or set configuration options for the provider.

      If a string is provided as the first argument, returns the value of the corresponding property. If an object is provided, sets the provider's properties according to the object.

      Parameters

      • options: string | IMLProviderOptions

        The configuration key as a string to get a value, or an object to set multiple options.

      • Optionalvalue: any

        Optional value to set if a string key is provided.

      Returns TileProviderOptions

    • Create a new Tile.

      Parameters

      • quadkey: string

        the quadkey of the tile to create

      Returns Tile

    • This method is used to determine the FeatureClass required to edit the feature. The FeatureClass defines how a certain feature behaves when its getting edited.

      By default, the Editor handles all features of geometry type 'LineString' as Line, 'Point' as Marker and '(Multi)Polygon' as Area.

      If you want to edit features with FeatureClass 'NAVLINK', 'PLACE' or 'ADDRESS' this method must be overridden to enable editing of Navlinks, Places or Addresses. The other methods required for each feature class are listed in the class documentation of EditableFeatureProvider.

      Parameters

      Returns string

      the FeatureClass of the feature, or null if the feature should not be editable.

    • Validate if a feature is stored in the local provider cache.

      Parameters

      • feature: { id: string | number }

        Object literal containing "id" property.

      Returns { feature?: Feature }

      the Feature if it is found, otherwise undefined

    • Experimental

      Finds the optimal path between two coordinates on a GeoJSON road network, considering various options. By default, the weight function returns the distance of the road segment, a lower distance implies a shorter route and is considered more favorable. If you have specific criteria such as road quality, traffic conditions, or other factors influencing the desirability of a road segment, you can customize the weight function accordingly. Pathfinding will consider only the locally cached data available on the client.

      Parameters

      • options: {
            allowTurn?: (
                turn: {
                    from: { index: number; link: Feature<"LineString"> };
                    to: { index: number; link: Feature<"LineString"> };
                },
            ) => boolean;
            from: GeoPoint
            | GeoJSONCoordinate;
            to: GeoPoint | GeoJSONCoordinate;
            weight?: (
                data: {
                    direction: "START_TO_END" | "END_TO_START";
                    distance: number;
                    feature: Feature<"LineString">;
                    from: GeoJSONCoordinate;
                    to: GeoJSONCoordinate;
                },
            ) => number;
        }

        The options object containing parameters for finding the path.

        • OptionalallowTurn?: (
              turn: {
                  from: { index: number; link: Feature<"LineString"> };
                  to: { index: number; link: Feature<"LineString"> };
              },
          ) => boolean

          Optional callback function to determine if a turn is allowed between road segments. If not provided, all turns are considered allowed.

        • from: GeoPoint | GeoJSONCoordinate

          The starting coordinates defining the path.

        • to: GeoPoint | GeoJSONCoordinate

          The ending coordinates of the path.

        • Optionalweight?: (
              data: {
                  direction: "START_TO_END" | "END_TO_START";
                  distance: number;
                  feature: Feature<"LineString">;
                  from: GeoJSONCoordinate;
                  to: GeoJSONCoordinate;
              },
          ) => number

          Optional callback function to determine the weight (cost) of traversing a road segment.

      Returns Promise<
          {
              distance: number;
              features: Feature<"LineString">[];
              from: GeoJSONCoordinate;
              path: GeoJSONFeature<"MultiLineString">;
              to: GeoJSONCoordinate;
          },
      >

      A Promise that resolves to an object containing the path, additional information, and the distance of the path.

      const pathOptions = {
      from: [startLongitude, startLatitude],
      to: [endLongitude, endLatitude],
      // optional
      allowTurn: (turn) => {
      // Custom logic to determine whether a turn is allowed
      return true;
      },
      // optional
      weight: (data) => {
      // Custom weight function to determine the cost of traversing a road segment
      return data.distance; // Default implementation uses distance as the weight
      },
      };
      const result = await provider.findPath(pathOptions);
      console.log(result);
    • Get a locally cached tile by quadkey.

      Parameters

      • quadkey: string

        the quadkey of the tile

      Returns Tile

    • Retrieves cached tiles within a specified bounding box or all cached tiles if no parameters are provided.

      If no arguments are passed, all cached tiles are returned. If a bounding box (bbox) and/or zoom level (zoomlevel) are provided, it filters the cached tiles based on the specified area and zoom level.

      Parameters

      • Optionalbbox: number[]

        An optional array of coordinates defining the bounding box in the format: [minLon, minLat, maxLon, maxLat]. If provided, only tiles within this geographic area will be returned.

      • Optionalzoomlevel: number

        An optional zoom level to filter tiles. If provided, only tiles at the specified zoom level will be returned.

      Returns Tile[]

      • An array of Tile objects that match the specified parameters, or all cached tiles if no parameters are given.
    • Gets a feature from the provider by id.

      Parameters

      • id: string | number

        the id of the feature

      Returns Feature<string>

      the found feature or undefined if feature is not present.

    • Gets features from provider by id.

      Parameters

      • ids: number[] | string[]

        array of feature ids to search for.

      • Optionaloptions: { onload?: (result: Feature<string>[]) => void; remote?: boolean }

        search options

        • Optionalonload?: (result: Feature<string>[]) => void

          Callback function for "remote" search.

        • Optionalremote?: boolean

          Force the provider to do remote search if no result is found in local cache.

      Returns any

      if just a single feature is found its getting returned otherwise an array of features or undefined if none is found.

    • Gets features from provider by id.

      Parameters

      • options: {
            id?: string | number;
            ids?: number[] | string[];
            onload?: (result: Feature<string>[]) => void;
            remote?: boolean;
        }

        search options

        • Optionalid?: string | number

          search for a single feature by id

        • Optionalids?: number[] | string[]

          array of ids to search for multiple features

        • Optionalonload?: (result: Feature<string>[]) => void

          Callback function for "remote" search

        • Optionalremote?: boolean

          Force the provider to do remote search if no result is found in local cache

      Returns any

      if just a single feature is found its getting returned otherwise an array of features or undefined if none is found.

    • Get the URL for feature specific requests.

      Parameters

      • space: string

        Name of the XYZ-Hub Space.

      • ids: string | number | (string | number)[]

        id(s) of the feature(s) the provider want's to request

      Returns string

      url string to receive the feature resource of the remote http backend

    • Get a specific request-header being added to all requests handled by the provider.

      Parameters

      • name: string

        The name of header to retrieve

      Returns string

      value of the request header or null if the header does not exist

    • Get the request-headers being added to all requests handled by the provider.

      Returns { [name: string]: string }

      Map of key value pairs. the key represents the header name

    • Get URL for layer specific requests.

      Parameters

      • layer: string

        Name of the XYZ-Hub Space.

      Returns string

      url string to receive a layer resource of the remote http backend

    • Get a specific request-parameter that's being added by the provider to all requests.

      Parameters

      • name: string

        The name of parameter to retrieve

      Returns string

      value of the request parameter or null if the parameter does not exist

    • Get the request-parameters that are being added by the provider to all requests.

      Returns { [name: string]: string }

      Map of key value pairs. the key represents the parameter name.

    • Get a tile by quadkey. If the tile is not cached already, it will be created and stored automatically. Data will be fetched from remote data-sources and attached to tile automatically

      Parameters

      • quadkey: string

        quadkey of the tile

      • callback: (tile: Tile) => void

        will be called as soon as tile is ready for consumption

      Returns any

      the Tile

    • Get URL for tile specific requests.

      Parameters

      • space: string

        Name of the XYZ-Hub Space.

      Returns string

      url string to receive a tile resource of the remote http backend

    • Read intersection-related connectivity for a Navlink node.

      This method allows an EditableFeatureProvider to override the default geometric intersection detection.

      It is called for the start or end node of a Navlink to determine whether that node forms an intersection and which Navlinks are connected to it.

      Implement this if intersection information is stored in feature properties, derived from external metadata, or otherwise known in advance.

      Return values:

      • undefined → No custom information is provided. The editor falls back to geometric intersection detection.

      • [] (empty array) → Explicitly no connected links at this node. The editor will NOT perform geometric detection.

      • [ { id, index? }, ... ] → Explicitly defined connected Navlinks, referenced by their feature ID. If index is omitted, the editor automatically determines the corresponding node coordinate of the connected link.

      Parameters

      • link: Feature

        The Navlink feature whose node connectivity is being read.

      • index: number

        The coordinate index of the node (0 → start node, last coordinate → end node).

        Note: Regardless of the returned value, geometric requirements for intersection (such as spatial proximity and coordinate precision) must still be fulfilled. See the intersectionScale property for details.

      Returns { index?: number; link: string | number }[] | []

      An array of { id: string | number; index?: number }, an empty array to signal "no connection", or undefined to fall back to default detection.

    • Attribute reader for obtaining the direction of travel of a Navlink feature.

      This method must be implemented to enable editing of Navlinks.

      Parameters

      • link: Feature

        the Navlink whose direction is requested

      Returns "BOTH" | "START_TO_END" | "END_TO_START"

    • Attribute reader for obtaining the Height of a Building (extruded Area). The height must be specified in meters.

      This method must be implemented to enable editing of the height of an extruded Area.

      Parameters

      • feature: Feature

        The Area feature whose height is requested.

      Returns number

      The height in meters of the Building/Area or null if the Area is considered flat.

    • Attribute reader for obtaining if a Navlink feature can be accessed by pedestrians only.

      This method must be implemented to enable editing of Navlinks.

      Parameters

      Returns boolean

      true, if the Navlink can be accessed by pedestrians only, otherwise false.

    • Attribute reader for obtaining the id of the Navlink Feature on which the RoutingPoint of an Address or Place feature is located. For Addresses an Id must be returned. If null is returned for a Place, the Place is treated as "floating" without a RoutingPoint.

      This method must be implemented to enable editing of Places or Addresses.

      Parameters

      • feature: any

        The Address or Place of which the Navlink of the RoutingPoint is requested.

      Returns string | number

      the Id of the Navlink on which the RoutingPoint is located.

    • Attribute reader for obtaining the RoutingPoint's geographical position of an Address or Place. The geographical position must be located on the geometry of the related Navlink feature.

      This method must be implemented to enable editing of Places or Addresses.

      Parameters

      • feature: any

        The Address or Place feature whose RoutingProvider is requested.

      Returns GeoJSONCoordinate

      GeoJSON Coordinate representing the geographical position of the RoutingPoint or null if a Place does not have a RoutingPoint.

    • Attribute reader for obtaining the id of the TileProvider containing the corresponding Navlink, of an Address or Place feature, on which the RoutingPoint is located.

      This method must be implemented to enable editing of Places or Addresses.

      Parameters

      Returns string

      the Id of the TileProvider in which the object is stored. If undefined is returned, the RoutingPoint's Navlink is assumed to be in the same TileProvider as the Address/Place.

    • Attribute reader for obtaining the turn-restrictions of two Navlink Features.

      This method must be implemented to enable editing of Navlinks.

      Parameters

      • turnFrom: { index: number; link: Feature }

        The Navlink and it's coordinate index from which to turn from

      • turnTo: { index: number; link: Feature }

        The Navlink and it's coordinate index to which you want to turn

      Returns boolean

      true if turn is allowed, otherwise false.

    • Attribute reader for obtaining the zLevels of a Navlink feature.

      This method must be implemented to enable editing of Navlinks.

      Parameters

      • link: Feature

        the Navlink whose zLevels are requested

      Returns number[]

      An array containing the zLevel for each coordinate of the Navlink.

    • Remove an EventListener from the provider. Valid events: "featureAdd", "featureRemove", "featureCoordinatesChange", "clear" and "error"

      Parameters

      • type: string

        A string which specifies the type of event for which to remove an event listener.

      • listener: (event: CustomEvent) => void

        The listener function of the event handler to remove from the provider.

      • Optional_c: any

      Returns boolean

    • Search for feature(s) in the provider.

      Parameters

      • options: {
            ids?: number[] | string[];
            onerror?: (
                error: {
                    message: string;
                    name: "NetworkError";
                    responseText: string;
                    status: number;
                },
            ) => void;
            onload?: (result: Feature<string>[]) => void;
            point?: GeoPoint | GeoJSONCoordinate;
            radius?: number;
            rect?: GeoRect | GeoJSONBBox;
            remote?: boolean;
        }

        configure the search

        • Optionalids?: number[] | string[]

          Search features by Ids.

        • Optionalonerror?: (
              error: {
                  message: string;
                  name: "NetworkError";
                  responseText: string;
                  status: number;
              },
          ) => void

          Function to be called when a request of a "remote search" fails.

        • Optionalonload?: (result: Feature<string>[]) => void

          Callback function for "remote" search.

        • Optionalpoint?: GeoPoint | GeoJSONCoordinate

          Geographical center point of the circle to search in. options.radius must be defined.

        • Optionalradius?: number

          Radius of the circle in meters, it is used in "point" search.

        • Optionalrect?: GeoRect | GeoJSONBBox

          Geographical Rectangle to search in. [minLon, minLat, maxLon, maxLat] | GeoRect.

        • Optionalremote?: boolean

          Force the data provider(s) to do remote search if no result is found in local cache.

      Returns Feature<string>[]

      array containing the searched features

      // searching by ids:
      provider.search({ids: [1058507462, 1058507464]})

      // searching by point and radius:
      provider.search({
      point: {longitude: 72.84205, latitude: 18.97172},
      radius: 100
      })

      // searching by Rect:
      provider.search({
      rect: {minLon: 72.83584, maxLat: 18.97299, maxLon: 72.84443, minLat: 18.96876}
      })

      // remote search:
      provider.search({
      rect: {minLon: 72.83584, maxLat: 18.97299, maxLon: 72.84443, minLat: 18.96876},
      remote: true, // force provider to do remote search if feature/search area is not cached locally
      onload: (result) => {...}
      })
    • Search for feature(s) in the provider.

      Parameters

      • options: {
            id: string | number;
            onerror?: (
                error: {
                    message: string;
                    name: "NetworkError";
                    responseText: string;
                    status: number;
                },
            ) => void;
            onload?: (result: Feature<string>) => void;
            remote?: boolean;
        }

        configure the search

        • id: string | number

          search feature by id.

        • Optionalonerror?: (
              error: {
                  message: string;
                  name: "NetworkError";
                  responseText: string;
                  status: number;
              },
          ) => void

          Function to be called when a request of a "remote search" fails.

        • Optionalonload?: (result: Feature<string>) => void

          Callback function for "remote" search.

        • Optionalremote?: boolean

          Force the data provider(s) to do remote search if no result is found in local cache.

      Returns Feature

      array containing the searched features

      // searching by id:
      provider.search({id: 1058507462})

      // remote search:
      provider.search({
      id: 1058507462,
      remote: true, // force provider to do remote search if feature/search area is not cached locally
      onload: (result) => {...}
      })
    • Point Search for feature(s) in provider.

      Parameters

      • point: GeoPoint | GeoJSONCoordinate

        Geographical center point of the point to search in. options.radius must be defined.

      • Optionaloptions: {
            onerror?: (
                error: {
                    message: string;
                    name: "NetworkError";
                    responseText: string;
                    status: number;
                },
            ) => void;
            onload?: (result: Feature<string>[]) => void;
            radius: number;
            remote?: boolean;
        }

        configure the search

        • Optionalonerror?: (
              error: {
                  message: string;
                  name: "NetworkError";
                  responseText: string;
                  status: number;
              },
          ) => void

          Function to be called when a request of a "remote search" fails.

        • Optionalonload?: (result: Feature<string>[]) => void

          Callback function for "remote" search.

        • radius: number

          the radius of the circular area in meters to search in

        • Optionalremote?: boolean

          Force the data provider(s) to do remote search if no result is found in local cache.

      Returns Feature<string>[]

      layer.search({longitude: 72.84205, latitude: 18.97172},{
      radius: 100
      })
      // or:
      layer.search([72.84205, 18.97172], {
      radius: 100
      })
    • Rectangle Search for feature(s) in the provider.

      Parameters

      • rect: GeoRect | GeoJSONBBox

        Geographical Rectangle to search in. [minLon, minLat, maxLon, maxLat] | GeoRect.

      • Optionaloptions: {
            onerror?: (
                error: {
                    message: string;
                    name: "NetworkError";
                    responseText: string;
                    status: number;
                },
            ) => void;
            onload?: (result: Feature<string>[]) => void;
            remote?: boolean;
        }

        configure the search

        • Optionalonerror?: (
              error: {
                  message: string;
                  name: "NetworkError";
                  responseText: string;
                  status: number;
              },
          ) => void

          Function to be called when a request of a "remote search" fails.

        • Optionalonload?: (result: Feature<string>[]) => void

          Callback function for "remote" search.

        • Optionalremote?: boolean

          Force the data provider(s) to do remote search if no result is found in local cache.

      Returns Feature<string>[]

      provider.search({minLon: 72.83584, maxLat: 18.97299, maxLon: 72.84443, minLat: 18.96876})
      // or:
      provider.search([72.83584, 18.96876, 72.84443,18.97299])

      // remote search:
      provider.search({minLon: 72.83584, maxLat: 18.97299, maxLon: 72.84443, minLat: 18.96876}, {
      remote: true, // force provider to do remote search if search area is not cached locally
      onload: (result) => {...}
      })
    • Search for feature by id in the provider.

      Parameters

      • id: string | number

        id of the feature to search for

      • Optionaloptions: {
            onerror?: (
                error: {
                    message: string;
                    name: "NetworkError";
                    responseText: string;
                    status: number;
                },
            ) => void;
            onload?: (result: Feature) => void;
            remote?: boolean;
        }

        configure the search

        • Optionalonerror?: (
              error: {
                  message: string;
                  name: "NetworkError";
                  responseText: string;
                  status: number;
              },
          ) => void

          Function to be called when a request of a "remote search" fails.

        • Optionalonload?: (result: Feature) => void

          Callback function for "remote" search.

        • Optionalremote?: boolean

          Force the data provider(s) to do remote search if no result is found in local cache.

      Returns Feature

      provider.search(1058507462)

      // remote search:
      provider.search(1058507462,{
      remote: true, // force provider to do remote search if search area is not cached locally
      onload: (result) => {...}
      })
    • Set request-header that should be added to all request handled by the provider.

      Parameters

      • name: string

        The name of the header whose value is to be set.

      • value: string

        The value to set as the body of the header.

      Returns void

    • Set request-headers that should be added to all request handled by the provider.

      Parameters

      • headers: { [name: string]: string }

        Map of key value pairs. the key represents the header name.

      Returns void

    • Set the tile margin in pixel.

      Parameters

      • margin: any

        the tileMargin

      Returns void

    • Set a specific request-parameter that should be added to all request handled by provider. If undefined is set the parameter get's cleared/removed.

      Parameters

      • name: string

        The name of the parameter whose value is to be set.

      • value: string | string[]

        The value(s) of the parameter.

      Returns void

    • Set request-parameters that should be added to all request handled by provider.

      Parameters

      • parameters: { [name: string]: string | string[] }

        A map of key value pairs. the key represents the parameter name. Possible value types are string, string[] or undefined. If undefined is used parameter get's cleared/removed.

      Returns void

    • Sets result filtering based on properties search in Hub backend. https://www.here.xyz/api/devguide/propertiessearch/

      After setting the property search, the provider will clear all features and data will be requested from hub using the property search filter. The response will contain only the features matching all conditions in the query. If function is called without arguments all filters will be cleared.

      Parameters

      • key: string

        the name of property

      • operator: "=" | "!=" | ">" | ">=" | "<" | "<="

        the operator used

      • value: string | number | boolean | number[] | string[] | boolean[]

        value the value to be matched

      Returns void

      // response will only contain features that have a property called 'name' with 'FirstName' as it's value
      provider.setPropertySearch('name','=','FirstName')
    • Sets result filtering based on properties search in Hub backend. https://www.here.xyz/api/devguide/propertiessearch/ After setting the property search, the provider will clear all features and data will be requested from hub using the property search filter. The response will contain only the features matching all conditions in the query. If propertySearchMap is set to null or none is passed all previous set filters will be cleared.

      Parameters

      • propertySearchMap: {
            [name: string]: {
                operator: "=" | "!=" | ">" | ">=" | "<" | "<=";
                value: any;
            };
        }

        A Map of which the keys are the property names and its values are Objects defining the operator ( '=', '!=', '>', '>=', '<', '<=' ) and the value to be matched.

      Returns void

      // set multiple conditions
      // provider will only contain features that have a property called name with the value Max OR Peter
      // AND a property called age with value less than 32
      provider.setPropertySearch({
      'name': {
      operator: '=',
      value: ['Max','Petra']
      },
      'age': {
      operator: '<',
      value: 32
      }
      })
      // clear previous set filters
      provider.setPropertySearch(null)
    • Set tags to filtering results based on tags in Hub backend. After setting tags, provider will clear all features and data will be requested from hub including the new tag filter.

      Parameters

      • tags: string | string[]

        the tag(s) that will be send to xyz-hub endpoint

      Returns void

    • Attribute writer for storing the EditStates of a Feature. The EditStates provide information about whether a feature has been created, modified, removed or split.

      By default EditStates aren't tracked/stored.

      Parameters

      • feature: Feature

        The Feature whose EditState should be written.

      • editState: "created" | "modified" | "removed" | "split"

        the EditState to store

      Returns void

    • Attribute writer for storing the Height of a Building (extruded Area). The height must be specified in meters.

      This method must be implemented to enable editing of the height of an extruded Area.

      Parameters

      • feature: Feature

        The Area feature whose height should be updated/written.

      • height: number

        The height specified in meters

      Returns void

    • Attribute writer for storing the Navlink reference on which the RoutingPoint of an Address or Place feature is located.

      This method must be implemented to enable editing of Places or Addresses.

      Parameters

      • location: any

        The Address or Place of which the Navlink reference of the RoutingPoint to store.

      • link: Feature

      Returns void

    • Attribute writer to store the RoutingPoint's geographical position of an Address or Place. The geographical position must be located on the geometry of the related Navlink feature.

      This method must be implemented to enable editing of Places or Addresses.

      Parameters

      • feature: any

        The Address or Place feature whose RoutingPoint position to write.

      • position: GeoJSONCoordinate

        the geographical position of the RoutingPoint.

      Returns void

    • Attribute writer for writing a turn restriction between two Navlink features.

      This method must be implemented to enable editing of Navlinks. It defines whether a turn from one Navlink to another is permitted or restricted.

      Parameters

      • restricted: boolean

        Specifies whether the turn is forbidden (true) or allowed (false).

      • turnFrom: { index: number; link: Feature }

        The originating Navlink and its coordinate index from which the turn starts.

      • turnTo: { index: number; link: Feature }

        The destination Navlink and its coordinate index to which the turn is directed.

      Returns void

    • Attribute writer for writing the zLevels of a Navlink feature.

      This method must be implemented to enable editing of Navlinks.

      Parameters

      • link: Feature

        the Navlink whose zLevels should be set

      • zLevels: number[]

        An array containing the zLevel for each coordinate of the Navlink

      Returns void

      An array containing the zLevel for each coordinate of the Navlink.