# Map layers (lines and areas)

> Your geology map as live data: sketch it in the field, trace it in QGIS, publish it to the web map and every crew phone.

Source: https://geodb.io/guide/topic/data_layers/ · Category: Sharing your data
Map layers are how lines and areas live in geoDB as *data*, not as a
picture: map units, contacts, faults, alteration zones, targets,
infrastructure. Every feature keeps its geometry, its attributes and its
original coordinates in the CRS you drew or imported it in.

## From field sketch to project map

1. **Sketch in the field.** On the phone, open a mapping area and sketch
   contacts, faults and units by hand over the basemap, on separate sheets
   (lithology, structure, alteration). It works offline; a sync uploads the
   sketch in place on the map (the field app 2.0 and later also uploads the
   strokes themselves).
2. **Open it in QGIS.** With the geoDB QGIS plugin, version 2.35.6 or
   later, **Field sketches** lists each sketch by mapping area, who drew it
   and when. **Open sketch** loads the image in place with a see-through
   background, ready to trace. **Open strokes as lines** turns the strokes
   into draft lines, one layer per sheet, so you clean them up instead of
   tracing from zero.
3. **Trace it.** **New map layer** makes a layer of lines, areas or points
   with its kind (map units, contacts, faults…) in your project's CRS. Add
   the attributes you like (unit, confidence, notes) and note the sketch it
   was traced from.
4. **Publish to geoDB.** The layer goes live on the web map and on crew
   phones. Save it as a draft instead if it is not ready.

## Bringing an existing map in

Upload a zipped shapefile, GeoPackage, KML/KMZ or GeoJSON from **Import →
Import map layers**, from **Display settings → Map layers**, or from the
map editor's **Add layer** menu. A package with several layers lists each
one so you pick what to bring in. Uploads land as **drafts**: saved, but on
no map until someone publishes them. The map editor's **Add layer** and the
**Import map layers** page can put them straight on the map when you tick
that box. If exactly one live layer of the same type (lines, areas or
points) already has that name, a layer from a zipped shapefile package or a
GeoPackage replaces it and the old one is archived (kept); a KML, KMZ or
GeoJSON layer, which is named after the file, is saved as a draft and asks
whether to replace that layer or keep both.

A layer that comes with its own style (a QGIS style, GeoPackage or KML
styles) keeps it. A layer with none is coloured by geoDB and says so: areas
by an obvious unit field (unit, map unit, lithology, formation…), anything
else one colour per kind. Restyle it in QGIS and publish, or use **Link to
catalog** to take the colours and FGDC patterns of your Lithology,
Alteration or Formation catalog, shared with the strip logs and 3D.

## Keeping a layer up to date

Pull the layer into QGIS, edit it, and press **Publish to geoDB** (plugin
2.35.6 or later). The new version replaces the old one on every map and
phone, and the old one moves to **Archived**: kept, and it can be made live
again. Features you did not touch keep their original coordinates exactly.
If someone else published a newer version after your pull, the plugin asks
before replacing it.

## Managing your layers

**Display settings → Map layers** on the web lists every layer of the
project, live, draft or archived. There you rename a layer or change its
kind (**Rename / kind**), publish a draft (replacing the layer it updates,
or alongside it), discard a draft, archive a live layer or make an archived
one live again, and link a layer to a catalog. The draft badge in the map's
layer panel publishes a draft right there.

In QGIS (plugin 2.35.6 or later), the **geoDB map layers** panel does the
same and more: it shows each layer's kind, feature count, last edit and the
sketch it was traced from, and restores a discarded draft from the Trash.

## On the phone

Live map layers download to crew phones with the field syncs and work
offline. In the field app 2.0 and later, tap a unit or a fault to see what
it is: the layer, its kind, its name and attributes, and the field sketch it
was traced from. The phone sketches; lines and areas are made in QGIS (or
the web), not drawn on the phone.

## Where map layers show

- **Your project's map** in the map editor, toggled in its layer panel, and
  in map figures you capture from it.
- **QGIS**, with their styling, through the geoDB plugin.
- **Crew phones**, offline included.
- **Partner data access**: live layers are part of the project data that
  connected tools and vendor exports read. Drafts and archived layers never
  are.

Not yet: the 3D viewer, shared review maps, public map embeds and the
company-wide map.
