Drive Zones setup

Drive Zones data setup

Drive Zones need prepared road-distance data before they can answer service-area questions for selected addresses.

What this setup does

The setup prepares New Zealand road-distance data from OpenStreetMap-derived sources and applies customer Drive Zones rules for selected StreetKit addresses.

What it does not do

  • It does not add live routing to the browser widget.
  • It does not provide live traffic, exact travel time, courier certification, or NZ Post delivery status.
  • It does not create payment, billing, or accounts.
  • It should not commit full generated Drive Zones output or private customer rules.

Data requirements

  • StreetKit address data with selected-address IDs and coordinates.
  • Customer Drive Zones origins and distance rules.
  • Compatible OpenStreetMap-derived road data.
  • Source metadata recording provider, licence, and preparation time.
  • Routing attribution: Routing data © OpenStreetMap contributors, available under the Open Database License.

Example attribution metadata

{
  "routingSource": {
    "provider": "OpenStreetMap",
    "licence": "ODbL",
    "osmCopyrightUrl": "https://www.openstreetmap.org/copyright",
    "osmLicenceFaqUrl": "https://osmfoundation.org/wiki/Licence/Licence_and_Legal_FAQ"
  },
  "attribution": {
    "required": true,
    "text": "Routing data © OpenStreetMap contributors, available under the Open Database License.",
    "urls": [
      "https://www.openstreetmap.org/copyright",
      "https://osmfoundation.org/wiki/Licence/Licence_and_Legal_FAQ"
    ]
  }
}

Operator summary

Keep source downloads, prepared routing data, generated Drive Zones output, and customer rules in ignored local paths unless a reviewed release process explicitly publishes them.

Example widget config

After Drive Zones data has been prepared, point the widget at the Drive Zones metadata. The widget uses it only after a user selects an address.

StreetKit.init({
  input: "#address",
  publicMode: true,
  indexBaseUrl: "https://index.streetkit.smp.kiwi/public/v1",
  deliveryZones: {
    enabled: true,
    mode: "precomputed_driving",
    metaUrl: "/streetkit-delivery/meta.json"
  },
  onSelect(address, context) {
    console.log(context.delivery);
  }
});

Example response

Drive Zones output should be treated as eligibility context, not as a route certificate.

{
  "delivery": {
    "available": false,
    "mode": "precomputed_driving",
    "status": "not_precomputed",
    "addressId": "linz:123456",
    "zoneVersion": "v2026-05-09-delivery-001",
    "addressDataVersion": "fixture-v1",
    "distanceKm": null,
    "distanceMetres": null,
    "message": "Selected address is not available for this Drive Zones dataset.",
    "disclaimer": "Estimated driving distance based on OpenStreetMap road data at the time the zone index was built.",
    "attribution": {
      "text": "Routing data © OpenStreetMap contributors, available under the Open Database License.",
      "urls": [
        "https://www.openstreetmap.org/copyright",
        "https://osmfoundation.org/wiki/Licence/Licence_and_Legal_FAQ",
        "https://project-osrm.org/"
      ]
    }
  }
}

Attribution and licensing notes

Routing data © OpenStreetMap contributors, available under the Open Database License. Include OSM attribution and link to OpenStreetMap copyright and licence notes wherever OSM-derived Drive Zones are documented or displayed.

Complete an ODbL/share-alike review before commercial distribution of OSM-derived Drive Zones datasets. Do not claim endorsement by OpenStreetMap or related routing-data projects.

Limitations

  • OSM data changes over time; record the source URL and preparation date.
  • Some addresses may be missing coordinates or may not have a route result.
  • Drive Zones output can be customer-sensitive if it exposes service-area strategy.
  • Full generated outputs belong under ignored paths such as dist-drive-zones/.

Future live routing path

A future live routing feature should be designed separately as StreetKit Route with its own provider, privacy, quota, timeout, and fallback rules before release.