πŸ—ΊοΈDisplay Ellipsis Drive layers in your app

Ellipsis Drive allows you to easily use layers in your own apps. While you can of course create an OGC link for your layer, in many cases it can be easier to use one of the Javascript mapping packages. These packages offer simple one-liners to add a layers and take care of styling and rendering for you. We recommend using Leaflet in case you are looking for an easy to use library and mapLibre if you are looking for a more heavy duty solution.

We recommend using one of the packages, if you however wish to develop from scratch we reccomend using the XYZ protocol for rasters and the vector tile protocol for vectors.

To display a layer you always need the layer id. Adding the timestamp id and style id are optional and tell the app which timestamp to use within the layer and how to style it. These id's can be found in the layer metadata that can be obtained with this API call or via the Ellipsis Drive app.

Mind that you can provide both a styleId or a style object. With the styleId you can refer to an already existing style on the server. With a style object you can define a fully custom style. This can be used whenever you want to allow the user to edit the style or when you want to dynamically style your map depending on for example viewport.

Authentication

If the layer you wish to display is not set to 'Link Sharing' or 'Public' you will need to use a token for authentication. You can check out this article to learn how to obtain these tokens. We recommend to use Access tokens for apps.

Organizing layers by using folders

Oftentimes you'll need additional options to properly organize the layers that you want to display. For example, you may want to organize layers based on the clients that will need access to them. In this case it can be good to organize your layers using folders. Then you can create a folder for each of your users and store in your backend which folder id corresponds to which user. When the user visits your app, you can create an access token for the correct folder and pass both the access token and folder id to your app. Your app can now use this folder id and token to look for content and display this content.

Looking for content can be done by simply listing the folder or by traversing it. Traversing can be great in case you have a lot of content and you organised it in a predefined way. For example in {category}/{year}/

Further capabilities

Once you succeeded in displaying the layers you might be interested in adding additional functionality. Such as analysis or dynamic styling. Check out this article for more on this.

Last updated