loadMapFromAsset

fun loadMapFromAsset(context: Context, fileName: String): MapBuild?

This function is responsible for loading the Map content from Json file that is located the assets folder of the application. it takes the context of the application and the name of the JSON file as parameters. then it reads the JSON file and returns it as a string.

Return

the JSON file as a string or null if the file is not found

Parameters

context

the context of the application

fileName

the name of the JSON file

Throws

if the file is not found