'How to draw polyline over map in apple watchOS

We have tried with apple map but apple map SDK does not allow us to draw polyline over the map so we have seen one application that is doing a similar thing using MapBox SDK. But unfortunately, Mapbox official documentation does not provide any guides about implementing Mapbox SDK in Apple WatchOs.

We have also tried to contact Mapbox support but we didn't get a response from there so if anyone knows how to integrate Mapbox SDK in Apple watchOS.



Solution 1:[1]

Unfortunately, Mapbox SDK does not support watchOS.

As Maps SDK cannot be used with WatchOS because Metal API is not available on watchOS

source

MapboxStatic could be your best chance to show a polyline with non-interactive map. You can check out some basic examples here. It works perfectly with MapboxDirections in case you don't have the shape coordinates or you can build your own GeoJson using Turf.

All the SDKs mentioned above support watchOS.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1