You are viewing Nextmv legacy docs. ⚡️ Go to latest docs ⚡️

Upgrade Guide

v0.10.0 Upgrade Guide

Nextmv SDK

  • Set your go.mod requirements to match the new version.
require (
   github.com/nextmv-io/code/engines v0.10.0
   github.com/nextmv-io/code/hop v0.10.0
)
Copy
  • Profiles in the routingkit measure constructors have changed. We support the following standard profiles: Car, Truck, Bike and Pedestrian. We also provide support for custom profiles. Learn more about routingkit measures and (custom) profiles here.
snapDistance := 1000
cacheSize := 1<<30
fallbackMeasure := measure.ScaleByPoint(measure.HaversineByPoint(), 1.3)
byPointDistance, err := routingkit.ByPoint(
   osmFile,
   snapDistance,
   cacheSize,
   routingkit.CarTravelProfile,
   fallbackMeasure,
)
byPointDuration, err := routingkit.DurationByPoint(
   osmFile,
   snapDistance,
   cacheSize,
   fallbackMeasure,
)
Copy

Page last updated