Map feature types

A map feature type is a named, styled kind of extra shape that editors draw on an entry, such as a “Trail” line, a “Parking area” or a “Viewpoint” point. This page explains when you need them, how to create them and how to connect them to a Map shapes element. It is for project Owners.

What is a map feature type?

A map feature type gives the extra shapes on your entries a name and a look. Each one is a point, a line or an area, with its own color and, for points, an icon. When an editor draws a shape in a Map shapes element, they pick its feature type, the shape is drawn in that style, and websites and apps get the feature type with every shape.

Map feature types only apply to extra shapes in Map shapes elements. An entry’s main location is styled by its type’s Type color. See Types.

When do I need them?

Use map feature types when one entry has several shapes that mean different things. For example, a “Nature reserve” entry might hold a few “Trail” lines, a “Parking area” and two “Viewpoint” points. Without feature types those would all be anonymous shapes; with them, a website can draw trails in green and show parking with its own icon.

If an entry has just one extra shape, such as a delivery area, you don’t need them.

How do I create a map feature type?

  1. Open Content model and choose the Map feature types tab.
  2. Click Create your first feature type, or New feature type if the project already has some. In an empty project you can also start from one of the quick starts: Trail, Parking area or Viewpoint.
  3. Fill in the New map feature type form:
    • Name: what editors pick when they draw, for example “Trail”.
    • Identifier: the name apps use to tell shapes apart. It is suggested from the name. The rules are the same as for types (see What can an identifier look like?).
    • What kind of shape is it?: Point (a single spot, such as a viewpoint or an entrance), Line (a path or route, such as a trail or a road) or Area (a space with a border, such as a parking area or a park).
    • Icon (points only): Pin, Flag, Tree, Mountain, Tent, Water, Building, Route, Star, Parking or Information.
    • Map color: one of the ten preset colors, or Custom for a lighter or darker shade of one of them, or any hex code like #1aa356.
  4. Check the preview, which shows how these shapes look on the entry maps.
  5. Click Create feature type.

Important: The Identifier and the kind of shape can’t be changed after creation, because they are saved with every shape of that type. To change them, create a new map feature type.

How do editors use map feature types?

Map feature types become available to editors through a Map shapes element:

  1. On the Elements library tab, edit the Map shapes element (or create one, see Elements).
  2. Under Map feature types, tick the feature types editors may use in this element.
  3. Save the element and make sure it is assigned to the right types.

From then on, editors pick a feature type for every shape they draw in that element. Only feature types whose kind fits the element’s Allowed shapes can be drawn. A shape without a feature type can be saved in a draft, but the entry can’t be marked ready to publish until every shape has one.

Leave all feature types unticked to allow shapes without a feature type in that element.

How do I change or delete a map feature type?

The Map feature types tab lists every feature type with its Shape, Color and where it is Used by. Type in the Filter box next to the New button to narrow it down by name, identifier or shape; long lists show 50 at a time, with a Show more button below.

  • Edit changes the name, icon and color. Shapes already drawn take on the new look. These changes reach the API right away, without publishing.
  • Delete works only when the feature type is not in use: no Map shapes element offers it (archived elements count too) and no shape in any entry uses it, in a draft or a published copy. If it is still in use, Spatibase says where. Untick it in the elements and give those shapes another feature type (then mark the entries ready and publish again) before deleting.

How do apps get map feature types?

Every shape in a Map shapes value carries the identifier of its feature type. Apps can load the list of feature types, with their names, kinds, icons and colors, from the project’s Content Delivery API, and use it to draw each kind of shape in its own style. The API page in the app lists the address under Endpoints as Map feature types. Developers can find the details in Field values.

Updated

Docs support

How can we help?

A person on our team reads every message. We include the page you are on, so you don't have to explain where.

Or write to hello@spatibase.com. For outages, check System status.

Talk to us

Not sure it’s a fit? Let’s find out

Tell us about your use case and what you need, from data model to security and deployment. In 30 minutes we’ll look at it together and tell you honestly if we can help.

Or write to hello@spatibase.com.