Maps, Routes and Right Triangles: Teaching Geometry with Navigation Apps
geometryapplied-mathmaps

Maps, Routes and Right Triangles: Teaching Geometry with Navigation Apps

eequations
2026-01-23 12:00:00
10 min read
Advertisement

Turn the Google Maps vs Waze debate into step-by-step geometry lessons using live map APIs—haversine, bearings, shortest path and traffic models.

Hook: Turn the Google Maps vs Waze Argument Into a Geometry Lab

Students stare at route instructions and wonder: why did Google Maps choose that road while Waze sends you down another? That gap—between an app's recommendation and a student's geometric intuition—is where learning happens. If your classroom needs high-engagement, real-world exercises that teach distance, bearing, right triangles and the mathematics of mapping APIs, this article gives you a ready-to-run lesson plan using live map data and mapping APIs.

Why this matters in 2026 (and what changed in 2025–26)

Late 2025 and early 2026 saw rapid adoption of AI-driven, multi-criteria routing (time, distance, emissions) and wider availability of lane-level geometries in mapping APIs. Crowdsourced telemetry (from apps like Waze) and deterministic map graphs (from providers like Google Maps, Mapbox and HERE) are now more accessible to educators. That means teachers can pull real routes, compare suggestions from different providers and convert that data into step-by-step math lessons—blending algebra, trigonometry and even introductory PDE/ODE concepts about traffic flow.

Learning objectives

  • Convert latitude/longitude into distance using the haversine formula and small-angle approximations.
  • Compute and interpret bearings and decompose distances into north/east components using right-triangle trig.
  • Model road networks as graphs and compare shortest-distance vs shortest-time routes using Dijkstra and A* heuristics.
  • Explore basic traffic dynamics with an ODE model for vehicle density on a road segment.

Tools, data sources and classroom setup

Pick a tech stack that fits your class. Here are proven choices:

  • Mapping APIs: Google Maps Platform (Directions, Roads, Geocoding), Waze (Waze for Cities / Connected Citizens), Mapbox, OpenStreetMap (OSM) and HERE. Use what you can access under your institution's licensing terms.
  • Python: Jupyter or Google Colab, with libraries geopy, networkx, osmnx, folium (for interactive maps) and numpy.
  • Front-end: Simple HTML/JavaScript with Leaflet or Mapbox GL for in-class demos.
  • Ethics & privacy: Explain API terms of service and avoid sharing personally identifiable route data.

Core math: From lat/lon to right triangles

Before students map app differences to math, give them the geometric tools to measure real-world distances and directions.

1) Haversine formula — great for accurate spherical distances

To compute great-circle distance between two points with latitudes φ1, φ2 and longitudes λ1, λ2 (in radians):

d = 2R * arcsin( sqrt( sin²((φ2−φ1)/2) + cos φ1 * cos φ2 * sin²((λ2−λ1)/2) ) )

Where R ≈ 6371 km. This is the standard for most mapping tasks and is an excellent starting point for classroom coding exercises.

2) Equirectangular (small-distance) approximation — easy to teach

For distances under ~50 km, you can approximate by projecting to a plane: compute north and east offsets as

Δx ≈ R * cos(φavg) * Δλ and Δy ≈ R * Δφ, where φavg = (φ1+φ2)/2.

Then apply the Pythagorean theorem: d ≈ sqrt(Δx² + Δy²). This is perfect for explicit right-triangle visualizations in the classroom.

3) Bearing (initial azimuth)

Given two coordinates, the forward bearing from point 1 to point 2 is:

θ = atan2( sin Δλ * cos φ2, cos φ1 * sin φ2 − sin φ1 * cos φ2 * cos Δλ )

Convert from radians to degrees and normalize to 0–360° clockwise from north. Teach students how this bearing translates to “turn right” or “turn left” on a map—an excellent place to connect trig to navigation language.

Classroom Exercise 1: Compare route distances from Google Maps and Waze

Goal: Pull routes from two providers for the same origin/destination pair, compute the geometric length of each route, and reconcile differences.

Step-by-step

  1. Choose an origin/destination inside your city. (Example: main square to a sports complex.)
  2. Fetch the route polylines using provider APIs. Google Maps Directions API returns encoded polylines; Waze doesn’t provide a general-purpose directions API to everyone, so use Waze for Cities data or a scraped route from an app instance for classroom demo if allowed. Alternatively, use Mapbox/HERE or OSM-derived routing for a second route.
  3. Decode the polyline into a sequence of (lat, lon) points.
  4. Compute segment lengths with the haversine formula or the equirectangular approximation for short segments, sum them to get total geometric distance.
  5. Compare with the provider’s reported distance and discuss discrepancies (rounding, speed-based lane shortcuts, ignored turn penalties).

Teaching tip: Ask students to hypothesize why the two apps differ. Are they minimizing distance, time, or some other criteria? This is a natural lead-in to graph models.

Classroom Exercise 2: Bearings and right triangles — live navigation problems

Goal: Convert an app's bearing instruction into north/east offsets and plot the resulting right triangle on a map.

Problem example

Waze reports: "Proceed on Road A for 1.4 km at bearing 135° (southeast)." From a known point (lat1, lon1), find the endpoint coordinates.

Step-by-step solution

  1. Convert bearing θ = 135° to radians.
  2. Compute offsets on the plane: Δx = d * sin θ (east), Δy = d * cos θ (north). Note sign conventions: cos 135° is negative so Δy will be negative (south).
  3. Convert offsets to angular changes: Δφ = Δy / R, Δλ = Δx / (R * cos φ1).
  4. Endpoint: φ2 = φ1 + Δφ, λ2 = λ1 + Δλ.

This exercise ties right-triangle trig (sine and cosine) to bearings and coordinate transformations—students love seeing a triangle they can draw on actual map tiles.

Classroom Exercise 3: Shortest path vs fastest path — graph algorithms with real weights

Goal: Build a road network graph, assign weights for distance and travel time, and compare shortest-distance vs shortest-time routes.

Model

Represent intersections as nodes and road segments as edges. Assign each edge two weights:

  • Distance — geometric length (from polyline points).
  • Time — distance / speed_limit or distance / observed_speed (using live telemetry where available).

Algorithms

Use Dijkstra's algorithm to minimize either distance or time. Use A* when you want better performance: the admissible heuristic is the straight-line (haversine) distance divided by max speed (for time) or just straight-line distance (for distance minimization).

Example classroom prompt

Pick two points. Run Dijkstra minimizing distance, then minimizing time (using different edge weights). Ask students to compute both route lengths and total estimated times. Then discuss why a longer distance route can be faster (higher speed limits, fewer intersections, or fewer slow turns).

Math connection: Show how adding a turn penalty (a fixed time cost per left turn) changes the edge weight and can flip the preferred route—this is an algebraic modification with measurable effects.

Advanced topic: Modeling traffic with differential equations

For advanced students, connect routing to traffic dynamics. Start with a simple ODE model for vehicle density ρ(t) on a road segment of length L:

dρ/dt = (q_in(t) − q_out(t)) / L

Here q_in and q_out are inflow/outflow (vehicles per unit time). If flow q is a function of density, q = v(ρ) * ρ (with v decreasing as ρ increases), you get a nonlinear ODE. For a linearized classroom demo, set v(ρ) ≈ v0 − kρ and solve:

dρ/dt = (q_in − (v0 − kρ)ρ) / L

Show students how to solve this first-order ODE numerically (Euler or RK4) and interpret how congestion builds and dissipates—linking calculus to observable routing behavior and app decisions about suggested detours. For instructors looking for portable classroom tools and quick demo hardware, consider curated kits and resources for tutors that make in-class demos frictionless (see this portable study kits review).

Worked example: From two app routes to a lesson

Here is a complete worked outline you can run in a 90-minute class (Python/Colab friendly):

  1. Pick a 5–10 km origin/destination. Use Google Directions API to fetch the recommended route and a second provider (Mapbox/OpenRouteService) for contrast.
  2. Decode polylines into point lists and compute segment lengths via haversine. Sum lengths to get geometric distances.
  3. Compute bearings at key intersections to teach right-triangle decomposition (Δx, Δy) and plot triangles on folium/Leaflet.
  4. Download a small OSM extract for the area using osmnx; build the networkx graph, assign distance and time weights, run Dijkstra minimizing distance and minimizing time.
  5. Compare results: show polygons on the map, list total distances and times, and ask students to explain the app choices in algebraic terms (edge weights, turn penalties, average speeds).
  6. Finish with a quick PDE/ODE demo: show how a sudden reduction in link capacity (e.g., an accident) changes q_out, increases ρ and eventually flips the fastest route—this is your bridge from static graph theory to dynamic routing.

Assessment ideas and rubrics

  • Quiz: Compute haversine distance and bearing for two coordinate pairs (30 points).
  • Project: Produce a 3–5 minute screencast explaining why two apps suggested different routes, with calculations and maps (50 points).
  • Extension: Implement Dijkstra and A* on a small OSM-derived graph and compare runtime/route choices (20 points).

Ethics, data and platform notes

APIs have different terms of service and privacy policies. Waze's strength is crowdsourced reports (speeding, hazards); Google combines telemetry and map data with robust routing APIs. In the classroom:

  • Use aggregated or synthetic routes whenever possible to avoid sharing PII.
  • Respect rate limits and caching rules—set up a single API key for the class account.
  • Explain to students that apps optimize different objective functions: time, distance, safety, or emissions.
Good teaching uses data responsibly. Show students both the power and the limits of live maps.

Expect the following advances to shape future lessons:

  • AI-explainability for routes: By 2026 many routing services offer natural-language rationales for route choices—an instant discussion starter about optimization objectives.
  • Richer telemetry: Lane-level geometry and historical speed profiles (late 2025 releases) will let students analyze lane-choice decisions and model micro-turn delays.
  • LLM integration: Large language models are being embedded in mapping platforms to generate step-by-step reasoning for choices; teachers can have students critique the reasoning using math.
  • Open routing datasets: Growing availability of cleaned OSM extracts and university datasets will make larger graph-based projects feasible in the classroom.

Actionable takeaways — classroom checklist

  • Start with one clear objective: distance, bearing, shortest route, or traffic dynamics.
  • Use haversine for accuracy; equirectangular for quick right-triangle demos.
  • Model roads as graphs with explicit edge weights (distance vs time) to reveal the Google vs Waze differences.
  • Introduce a simple ODE traffic model to show how route recommendations can change dynamically.
  • Respect API terms and privacy—use anonymized or synthetic data when in doubt.

Final classroom-ready resource list

  • Google Maps Platform (Directions, Roads) — API key required.
  • Waze for Cities / Connected Citizens — data-sharing program for city partners.
  • OpenStreetMap + osmnx/networkx — free and excellent for building local road graphs.
  • Python libs: geopy, numpy, folium, matplotlib, scikit-learn (for clustering detours), networkx.

Closing: Turn navigation debates into deep math

When students ask, “Why did Google Maps take one route and Waze another?” you have an open doorway to algebra, trigonometry and even calculus. Using live map data makes the math concrete: haversine distances become measurable objects, bearings form right triangles you can sketch on real streets, and graph algorithms let learners see how objective functions shape real-world behavior. In 2026, with richer map data and AI explainability, these lessons are more accessible and impactful than ever.

If you want a ready-made lesson pack (Colab notebooks, rubrics, and test datasets) or live help converting this into a multi-week unit, try our interactive lesson builder and tutoring at equations.live. We'll help you connect the Google Maps vs Waze debate to standards-aligned learning objectives and assessment items.

Call to action

Ready to bring navigation-based geometry into your classroom? Sign up at equations.live for free lesson packs, step-by-step notebooks and a live demo that walks through the exact examples in this article. Build confidence with real-world math—one route at a time.

Advertisement

Related Topics

#geometry#applied-math#maps
e

equations

Contributor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.

Advertisement
2026-01-24T08:09:44.031Z