Add your data to the map

When you have selected a map, you’ll most likely want to show something in it: the location of your shop, trail you’ve trekked, visualization of a future building, weather forecast… The possibilities how a map can help you inform or tell a story are endless, and we provide everything you need to build it. This page explains the basics and helps you get started based on what type of data you want to add.

To place anything on a map, you'll usually need to provide the exact coordinates of where you want to put it. How to get the coordinates: Go to the map selector, find the desired place, click on it, and copy its coordinates from the search bar. Or you can use the Geocoding API.

Add points, lines, polygons

Most objects on a map are essentially geometric shapes: points (single spots such as bus stops, lamps, trees), straight or curved lines (paths, roads, rivers), and area-covering polygons (buildings, forests, lakes). These geometric representations of objects are called vector features. There are several ways to add your own vector features to a map. Selecting the best way depends mainly on whether you have the features ready in some format or not, and how many you need to add. Let’s look at the options, simplest first:

#1 Add features directly

The easiest way is to define your features right in the map code or URL. It’s useful if you only need to add a few simple features to your map, such as a couple of markers (pins) to show where something is, or lines showing how to get from place A to place B. You don’t have to create any data file; all you need is to know the coordinates of whatever you want to show on the map. If your use case is more complex than that, it’s better to create a vector file to keep your data separate.

👉 How to add features to a static map (image):

👉 How to add features to an interactive map using MapTiler SDK JS:

#2 Use vector data file

Another way of adding vector features to a map is to link a separate file in compatible format, typically GeoJSON. This keeps your data decoupled from the app code and thus easier to maintain, share, and reuse. It becomes practical especially if you have many complex features. 👉 How to prepare and use a vector data file

#3 Use vector tileset

A vector tileset contains your custom vector features processed into map tiles. This processing is required if a simple vector file would exceed the size limit of 10 MB and 10 000 features.

To prepare a vector tileset, use our geoprocessing tool MapTiler Engine which also enables you to upload the finished tileset to MapTiler. Then you can add data from the vector tileset to your map:

Add images

There’s many different types of imagery you might want to show on your map, from simple icons to large sets of images taken from a drone, or even digitized historical maps. How to add them depends on the complexity of the task at hand. Let’s look at the options:

#1 Add image directly

Adding an image to your map as a linked data source is the easiest way, but it’s only possible if the image has a public URL, and only advisable for simple tasks like adding a single image. If you need anything more advanced, it becomes much easier to create a raster tileset.

👉 How to add a single image to a map using MapTiler SDK JS:

#2 Use raster tileset

A raster tileset contains your images cut into ready-to-use map tiles. The advantage over individual images is that the tileset is georeferenced, meaning that the images already contain information about where on the map they should be placed. They’re also optimized for zooming and panning. Last but not least, you can process multiple images into a single tileset, which makes it much easier to integrate. 👉 How to prepare and use a raster tileset

Add elevation data

Enriching your maps with the 3rd dimension gives you additional options like visually enhancing hills and ocean depths, or providing helpful info to map users for their route planning. Elevation data can be stored and integrated as part of common formats that hold other information as well, like GeoTIFF. For pure elevation data, you can use a raster-DEM tileset. It is similar to a common raster tileset, but the “image” inside is actually elevation encoded in standard RGB colors. 👉 How it works and how to use it

To use elevation, you don’t need to create a custom dataset. We have global data ready for you in our Terrain RGB and Ocean RGB tilesets.

Add weather data

Weather data is a special type of dynamic data describing atmospheric conditions such as temperature, humidity, precipitation, wind, and other information. To show it on a map, you first need to process the data into a suitable format. We have a separate section describing where you can get this data (if you don’t have your own), how to prepare it, and how to build a weather app with it. 👉 How to make weather maps

Add 3D objects

It’s possible to add 3D objects of many types. No matter if you have a simple GLB model created in 3D modelling software, created by photogrammetry, or scanned with LiDAR into a point cloud, there’s a way to show it on your map. 👉 See the SDK JS examples

Add a video

👉 How to add a video to map

On this page

    Was this helpful?