MapLibre also provides MapLibre Native an open-source maps toolkit for Android, iOS and other platforms.
Since both MapLibre GL JS and MapLibre Native share the same Style Specification, nothing special needs to be done to use Versatiles with MapLibre Native. For example, on iOS a Versatiles style URL can be passed to the initializer of MLNMapView
.
MLNMapView(frame: .zero, styleURL: URL(string: "https://tiles.versatiles.org/assets/styles/colorful.json")
While on Android you would call the setStyle
method on a MapView
to set the style:
mapView.getMapAsync { map ->
map.setStyle("https://tiles.versatiles.org/assets/styles/colorful.json")
}
Refer to the documentation of MapLibre Native for more information about using the toolkit.