/mvt_sample

Sample for using the Elasticsearch Vector Tiles Search API

Primary LanguageHTML

MVT sample

Sample code showing how to:

Prerquisites

This sample uses NodeJS. Install the runtime from NodeJS.

Setup

Install dependencies with npm. npm is included with the NodeJS runtime.

npm install

Start Elasticsearch

Run an Elasticsearch instance. The sample code assumes it is running on the location stored in the ES_URL environment variable or in http://localhost:9200. Note: Hexagon aggregation requires a subscription or trial license.

Run TMS server

To start the TMS server, run the node script. node is included with the NodeJS runtime. It will start a server in localhost and PORT environment variable or 80 by default.

node ./index.js

Demo page

To view the web page, just open up http://localhost:80 or http://localhost:{PORT} browser.