Directions deeplinks use stored coordinates, not address string
Why it matters
A directions deeplink that passes an address string instead of stored coordinates requires the maps app to re-geocode the address on the user's device. This introduces latency, geocoding ambiguity (a common street name in multiple cities can resolve to the wrong location), and dependency on network availability. CWE-682 (Incorrect Calculation) applies when coordinates are derived from address at deeplink-construction time instead of retrieved from storage. Schema.org GeoCoordinates exists precisely to make precise lat/lng available for machine consumption — ignoring it in favor of address string passing defeats the purpose of storing coordinates at all.
Severity rationale
Low because address-based deeplinks often work, but introduce geocoding ambiguity and unnecessary latency that can send users to the wrong destination.
Remediation
Use the stored latitude and longitude values directly in deeplink construction. Never use the address string as the deeplink destination parameter.
// CORRECT: stored coordinates
const deeplink = `https://maps.google.com/?daddr=${listing.latitude},${listing.longitude}`;
// WRONG: address string — forces re-geocoding with ambiguity risk
const deeplink = `https://maps.google.com/?daddr=${encodeURIComponent(listing.address)}`;
In src/components/ListingDetail.tsx (or equivalent), confirm that the directions link reads from listing.latitude / listing.longitude fields, not listing.address. If those fields are not currently included in the listing query, add them to the select — they should already be in the database per directory-map-location.map-rendering.coordinates-stored-explicit.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Map & Location Integration Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-682 — Incorrect Calculation — directions deeplink geocodes address at render time instead of using stored coordinates
- schema-org · GeoCoordinates — schema.org GeoCoordinates — latitude/longitude as typed structured data rather than address strings
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-map-location·automated