External Routing¶
Calculate itineraries or open external navigation applications (such as Google Maps or Apple Maps) directly from feature attribute forms in QField. Configure attribute fields with dynamic hyperlink expressions in QGIS to open routing and mapping services in external mobile applications.
Configuring External Routing in QGIS¶
Desktop preparation
Direct Navigation Directions¶
Configure an attribute field to open driving directions to feature coordinates in Google Maps.
Workflow
- Open your project in QGIS and add a text attribute field (such as
routing_url) to your vector layer. - Navigate to Vector Layer Properties... > Attribute Form.
- Select your routing attribute field and set "Widget Type" to "Attachment".
- Enable "Display a hyperlink for document path (read-only)".
-
Set "Default Value" to the following navigation directions expression:
concat( 'https://www.google.com/maps/dir/?api=1&destination=', y(transform($geometry, layer_property(@layer, 'crs'), 'EPSG:4326')), '%2C', x(transform($geometry, layer_property(@layer, 'crs'), 'EPSG:4326')), '&travelmode=driving' ) -
(Optional) Enable "Apply default value on update" to recalculate routing links automatically when feature geometries change.
Feature Location Preview¶
Configure an attribute field to open and highlight feature coordinates on external maps without initiating active turn-by-turn navigation.
Workflow
- Follow steps 1–4 from the navigation directions workflow above.
-
Set "Default Value" to the following location preview expression:
concat( '[https://maps.google.com?q=](https://maps.google.com?q=)', y(transform($geometry, layer_property(@layer, 'crs'), 'EPSG:4326')), '%2C', x(transform($geometry, layer_property(@layer, 'crs'), 'EPSG:4326')), '&zoom=19&t=h' ) -
(Optional) Enable "Apply default value on update".
Accessing External Navigation in QField¶
Fieldwork
Workflow
- Open your project in QField and tap a feature on the map canvas to open its attribute form.
- Locate the routing attribute field inside the feature form.
- Tap the hyperlink text to launch your device's native browser or external navigation app.