Map – location store, layers and endpoints

Structure of the shared location store, the single write path, the layers, client-side geocoding, the previews and the permissions of the backup import.

Overview

A universal layered Google map: photo locations from iPhone backups, company addresses (with client-side geocoding), property listings and MBVK auctions. All SQL lives in system/library/dlbtgeo/geostore.php behind the thin model adapter geo/geo; only Dlbtgeo::ingest() writes.

Data model

Table names carry the installation's own prefix in the database.

TableRole
geo_objectmap object (type, company, preview)
geo_object_source, geo_sourcesources of the object (e.g. a backup), source type, device
geo_locationlocations (coordinates, accuracy, position type, time)

Endpoints

EndpointBehaviourPermission
map.objects, map.layers, map.companiesmarkers for the viewport (bbox) and filters; layer tree per source; company layer from the company modellist
map.geocodepending, map.geocodecacheaddresses not yet geocoded (kind = company, realestate, mbvk) and storing a point geocoded in the client, marked geocodedlist
map.detailobject, its sources and locations within the scopedetail
map.thumbs, map.thumb96 px preview saved on the object row (savePreview) with a time limit, missing ones in a pending list; HEIC → JPEG, an SVG placeholder without supportopenfile
map.importbackup&backup_id=queues an iphone_backup_stream job (op = geo) and marks the backup as queuedimport

With the debug permission the objects response also contains the map SQL.

Permissions

  • All keys are classified BASE (install/permission_geomap_v1.sql).
  • Company scope in the query; for market layers the map permission of the source module; a geocoded company must be in the caller's scope; for a market point the owner model confirms the record exists; for the backup import the backup's company must be in scope.

Prerequisites

A Google Maps API key (company::getMapsApiKey) and the schema of the geo_ tables; if missing, the screen reports the installation error.

Related topics: map background job permissions