Distribute Web Apps

You can build and distribute web applications created with the Data Inspector Library components in a number of ways, as explained below.

Be aware that, according to HERE terms, if your products and/or services use map data that is made accessible through HERE Services, you need to show the (c) 20XX HERE copyright statement (where XX denotes the current year). Make sure that this statement is clearly visible on the map and is linked to the HERE SUPPLIER TERMS APPLICABLE TO LOCATION CONTENT page: https://legal.here.com/en-gb/terms/general-content-supplier-terms-and-notices.

  1. Run a web app on a local HTTPS web server and enable external access to this server if needed.

    Note: Limitation on using an HTTP web server

    The use of a local HTTP web server instead of HTTPS to share web applications has a limitation: it can work only in Firefox. There is no limitation for local development because localhost has a special security policy. For more info, see the option below.

  2. Share a web app through a local network.

    The Data Inspector Library includes UserAuthForm used for user authentication and depends on Web Crypto API that is available via a browser's crypto.subtle property. Some browsers (for example, Google Chrome) may not allow the usage of the Web Crypto API for non-secure origins. So, to be able to use custom applications via a local network, the Data Inspector Library provides Generic Token Requester.

    The example below shows how you can use it with the DataInspector:

    import { DataInspector, requestToken } from "@here/interactive-mapview-ui";
    ...
    const dataInspector = new DataInspector({
        ...
        widgets: {
            ...
            authForm: {
                ...
                tokenRequester: requestToken
            }
        },
        ...
    });
    
  3. Share a web app as a ZIP archive with the source code.

    To run the web app, you need to set up and configure your environment as described in the Prerequisites chapter.

  4. Build a static web page and distribute it as an archive.

    Currently, this works only in Mozilla Firefox or Microsoft Edge, since Google Chrome does not support web workers and CORS requests from web pages served from a local filesystem. Static web pages should be served by a local web server to work in Chrome.

  5. Integrate the Data Inspector as a component in another web app.

    The Library does not use the global scope and, therefore, does not interfere with any external code.

  6. Bundle a static web page as a cross-platform desktop application.

    You can use Electron to do this.

results matching ""

    No results matching ""