from Url
Deprecated
use fromUri instead
Will loads a new map style asynchronous from the specified URL.
url
can take the following forms: http://...
orhttps://...
: loads the style over the Internet from any web server.asset://...
: loads the style from the APKassets/
directory. This is used to load a style bundled with your app.file://...
: loads the style from a file path. This is used to load a style from disk.
This method is asynchronous and will return before the style finishes loading. If you wish to wait for the map to finish loading, listen to the MapView.OnDidFinishLoadingStyleListener callback or provide an OnStyleLoaded callback when setting the style on MapLibreMap.
If the style fails to load or an invalid style URL is set, the map view will become blank. An error message will be logged in the Android logcat and MapView.OnDidFailLoadingMapListener callback will be triggered.Return
this
Parameters
url
The URL of the map style