@magiclane/maps-sdk
    Preparing search index...

    Class SearchServiceAbstract

    Search service class

    Index

    Constructors

    Methods

    • Cancel specific request identified by the task handler.

      Parameters

      • taskHandler: TaskHandler

        The task handler associated with the request to be canceled.

      Returns void

      An exception if it fails.

    • Search using text and geographic area as discriminants.

      Parameters

      • options: {
            locationHint?: RectangleGeographicArea;
            onCompleteCallback: (err: GemError, results: Landmark[]) => void;
            preferences?: SearchPreferences;
            referenceCoordinates: Coordinates;
            textFilter: string;
        }

        Object containing search parameters

        • OptionallocationHint?: RectangleGeographicArea

          The location hint. The search will be restricted to the provided geographic area. Optional.

        • onCompleteCallback: (err: GemError, results: Landmark[]) => void

          Will be invoked when the search operation is completed, providing the search results and an error code.

          • GemError.success and a non-empty list of landmarks if the search was successfully completed
          • GemError.reducedResult and a non-empty list of landmarks if the search was successfully completed but only a subset of results were returned
          • GemError.invalidInput if the search input is invalid, e.g. referenceCoordinates are invalids
          • GemError.cancel if the search was canceled by the user
          • GemError.noMemory if the search engine couldn't allocate the necessary memory for the operation
          • GemError.operationTimeout if the search was executed on the online service and the operation took too much time to complete (usually more than 1 min, depending on the server overload state)
          • GemError.networkFailed if the search was executed on the online service and the operation failed due to bad network connection
        • Optionalpreferences?: SearchPreferences

          The search preferences. Optional.

        • referenceCoordinates: Coordinates

          The reference position. Results will be relevant to this position.

        • textFilter: string

          The text filter.

      Returns TaskHandler | null

      Associated TaskHandler for this operation if the search can be started otherwise null.

      An exception if it fails.

    • Search for landmarks along the specified route.

      Parameters

      • options: {
            onCompleteCallback: (err: GemError, results: Landmark[]) => void;
            preferences?: SearchPreferences;
            route: Route;
            textFilter?: string;
        }

        Object containing search parameters

        • onCompleteCallback: (err: GemError, results: Landmark[]) => void

          Will be invoked when the search operation is completed, providing the search results and an error code.

          • GemError.success and a non-empty list of landmarks if the search was successfully completed
          • GemError.reducedResult and a non-empty list of landmarks if the search was successfully completed but only a subset of results were returned
          • GemError.invalidInput if the search input is invalid, e.g. referenceCoordinates are invalids
          • GemError.cancel if the search was canceled by the user
          • GemError.noMemory if the search engine couldn't allocate the necessary memory for the operation
          • GemError.operationTimeout if the search was executed on the online service and the operation took too much time to complete (usually more than 1 min, depending on the server overload state)
          • GemError.networkFailed if the search was executed on the online service and the operation failed due to bad network connection
        • Optionalpreferences?: SearchPreferences

          The search preferences. Optional.

        • route: Route

          The target route.

        • OptionaltextFilter?: string

          The text filter. Optional.

      Returns TaskHandler | null

      Associated TaskHandler for this operation if the search can be started otherwise null.

      An exception if it fails.

    • Get list of landmarks for specific coordinates.

      Parameters

      • options: {
            onCompleteCallback: (err: GemError, results: Landmark[]) => void;
            position: Coordinates;
            preferences?: SearchPreferences;
            textFilter?: string;
        }

        Object containing search parameters

        • onCompleteCallback: (err: GemError, results: Landmark[]) => void

          Will be invoked when the search operation is completed, providing the search results and an error code.

          • GemError.success and a non-empty list of landmarks if the search was successfully completed
          • GemError.reducedResult and a non-empty list of landmarks if the search was successfully completed but only a subset of results were returned
          • GemError.invalidInput if the search input is invalid, e.g. referenceCoordinates are invalids
          • GemError.cancel if the search was canceled by the user
          • GemError.noMemory if the search engine couldn't allocate the necessary memory for the operation
          • GemError.operationTimeout if the search was executed on the online service and the operation took too much time to complete (usually more than 1 min, depending on the server overload state)
          • GemError.networkFailed if the search was executed on the online service and the operation failed due to bad network connection
        • position: Coordinates

          The position.

        • Optionalpreferences?: SearchPreferences

          The search preferences. Optional.

        • OptionaltextFilter?: string

          The text filter. Optional.

      Returns TaskHandler | null

      Associated TaskHandler for this operation if the search can be started otherwise null.

      An exception if it fails.

    • Get list of landmarks in the given geographic area.

      Parameters

      • options: {
            area: RectangleGeographicArea;
            onCompleteCallback: (err: GemError, results: Landmark[]) => void;
            preferences?: SearchPreferences;
            referenceCoordinates: Coordinates;
            textFilter?: string;
        }

        Object containing search parameters

        • area: RectangleGeographicArea

          The search target area.

        • onCompleteCallback: (err: GemError, results: Landmark[]) => void

          Will be invoked when the search operation is completed, providing the search results and an error code.

          • GemError.success and a non-empty list of landmarks if the search was successfully completed
          • GemError.reducedResult and a non-empty list of landmarks if the search was successfully completed but only a subset of results were returned
          • GemError.cancel if the search was canceled by the user
          • GemError.noMemory if the search engine couldn't allocate the necessary memory for the operation
          • GemError.operationTimeout if the search was executed on the online service and the operation took too much time to complete (usually more than 1 min, depending on the server overload state)
          • GemError.networkFailed if the search was executed on the online service and the operation failed due to bad network connection
        • Optionalpreferences?: SearchPreferences

          The search preferences. Optional.

        • referenceCoordinates: Coordinates

          The reference position. Results will be relevant to this position.

        • OptionaltextFilter?: string

          The optional text filter. Optional.

      Returns TaskHandler | null

      Associated TaskHandler for this operation if the search can be started otherwise null.

      An exception if it fails.

    • Get details for the given landmark list.

      The main purpose of this method is to populate the details for a landmark provided by selecting a landmark from the upper zoom level of the map. Other types of landmarks (such as the ones provided by search) are already up-to-date. Does not work with user created landmarks.

      Parameters

      • results: Landmark[]

        The landmark list for which the landmarks details are searched.

      • onCompleteCallback: (err: GemError) => void

        Will be invoked when the search operation is completed, providing the error code. If the landmarks in list already have the details populated, the function will return GemError.upToDate.

        • GemError.success if the search was successfully completed
        • GemError.invalidated if the landmark provided is invalid (ex: user created landmark)
        • GemError.upToDate if the landmark already has all the details.

      Returns TaskHandler | null

      Associated TaskHandler for this operation if the search can be started otherwise null.

      An exception if it fails.