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.
| Table | Role |
|---|---|
geo_object | map object (type, company, preview) |
geo_object_source, geo_source | sources of the object (e.g. a backup), source type, device |
geo_location | locations (coordinates, accuracy, position type, time) |
Endpoints
| Endpoint | Behaviour | Permission |
|---|---|---|
map.objects, map.layers, map.companies | markers for the viewport (bbox) and filters; layer tree per source; company layer from the company model | list |
map.geocodepending, map.geocodecache | addresses not yet geocoded (kind = company, realestate, mbvk) and storing a point geocoded in the client, marked geocoded | list |
map.detail | object, its sources and locations within the scope | detail |
map.thumbs, map.thumb | 96 px preview saved on the object row (savePreview) with a time limit, missing ones in a pending list; HEIC → JPEG, an SVG placeholder without support | openfile |
map.importbackup&backup_id= | queues an iphone_backup_stream job (op = geo) and marks the backup as queued | import |
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
mappermission 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.