---
title: "Prepare and add vector features to map: points, lines, polygons | Guides"
description: "Prepare and add custom vector features to your maps."
---

# Prepare and add vector features to map: points, lines, polygons

[Vector features](https://docs.maptiler.com/guides/how-maps-work/vector-feature/) are geometric shapes that represent most objects on a map:

-   Simple **points** can represent single spots such as bus stops, lamps, trees,
-   Straight or curved **lines** can be used for paths, roads, or rivers,
-   Enclosed **polygons** cover large areas like buildings, forests, and lakes.

Vector features are commonly used in maps but they’re also especially suitable for adding your own custom features.

There are several different ways how you can prepare and add custom vector features to your 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, from simplest to most complex.

## 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 the [coordinates](https://www.maptiler.com/tools/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](#use-vector-file) to keep your data separate.

How to add features to an **interactive map** using [MapTiler SDK JS](https://docs.maptiler.com/sdk-js/):

-   [Default marker](https://docs.maptiler.com/sdk-js/examples/default-marker/)
-   [Animated marker](https://docs.maptiler.com/sdk-js/examples/add-image-animated/)
-   [Custom marker](https://docs.maptiler.com/sdk-js/examples/custom-marker-icons/)
-   [Colored lines](https://docs.maptiler.com/sdk-js/examples/data-driven-lines/)
-   [Gradient line](https://docs.maptiler.com/sdk-js/examples/line-gradient/)

How to add features to a [static map (image)](https://docs.maptiler.com/guides/maps-apis/static-maps/static-maps-for-your-web/):

-   [Markers](https://docs.maptiler.com/guides/maps-apis/static-maps/static-map-with-markers/)
-   [Lines and polygons](https://docs.maptiler.com/guides/maps-apis/static-maps/static-map-with-lines/)

## Use vector data file

Another way of adding vector features to a map is to link a separate file in compatible format, typically [GeoJSON](https://geojson.org/). 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. To prepare a vector data file, use 👉 our friendly no-code [**Vector data editor**](https://docs.maptiler.com/guides/vector-data-editor/).

## Use vector tileset

A vector tileset contains your custom vector features processed into vector [map tiles](https://docs.maptiler.com/guides/how-maps-work/map-data/). This processing is required if a simple vector file would exceed the [size limit](https://docs.maptiler.com/guides/maps-apis/maps-platform/dataset-upload-formats-and-limits/).

To prepare a vector tileset, use our geoprocessing tool [MapTiler Engine](https://docs.maptiler.com/guides/on-prem/engine/). After tiling, Engine can upload the finished tileset right to your MapTiler account, and then you can add it to your map:

-   [Add the data programmatically](https://docs.maptiler.com/sdk-js/examples/vector-source/) using **MapTiler SDK JS**
-   [Add the data without coding](https://docs.maptiler.com/guides/map-design/data-sources/) in our visual editor **Map Designer**
