How to 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.
Note: HERE Copyright Notice
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.
-
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.
-
Share a web app through a local network. The Data Inspector Library includes
UserAuthFormused for user authentication and depends onWeb Crypto APIthat is available via a browser'scrypto.subtleproperty. Some browsers (for example, Google Chrome) may not allow the usage of theWeb Crypto APIfor 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 } }, ... }); -
Share a web app as a ZIP archive with the source code.
To run the web app, you need to set up your credentials and configure the environment.
-
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.
-
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.
-
Bundle a static web page as a cross-platform desktop application.
You can use Electron to do this.
Updated 2 days ago