Skip to content

Sniff Tool

Playwright-based browser interception that captures vector data from indoor map providers.

Usage

bash
python3 agent/tools/mappedin-sniff/sniff.py <map-page-url> -o <output-dir>/

Opens a mall's map page in a headless browser, waits for the mapping SDK to load data, saves all intercepted API responses as JSON files.

Works across all providers — captures whatever JSON/SVG the mapping SDK loads.

Output Files (Mappedin)

FileContentSize
public_1_polygon_*.jsonAll polygons with vertex coordinates0.5–6 MB
public_1_location_*.jsonStore names, amenity locations, metadata0.5–2 MB
public_1_map_*.jsonFloor definitions with georef control points50–90 KB
public_1_theme_*.jsonVisual theme settingsSmall
exports_mvf2_1_bundle.jsonSDK bundle metadataSmall

CV Fallback

agent/scripts/trace_units.py — OpenCV-based image tracing for malls without sniffable vector data. Multiple detection strategies: sensitive edge detection, color segmentation, dark anchor detection. 63 tests with golden fixtures.

Use sniff first. CV is fallback only for non-interactive floor plan images.