android - How can I parse kml file from the assets folder? -


I have a KLL file, which has some latitude LNG but I do not know how to parse it in Android?

I checked this link

but it is different. It is receiving data from the server in km format. But I have deposited the KL file in the property.

Thank you in advance ..

read KML:

  public string load KMLFromAsset () {string kmlData = null; Try {InputStream = getAssets (). Open ("yourKMLFile"); Int size = is.available (); Byte [] buffer = new byte [size]; Is.read (buffer); is close(); KmlData = new string (buffer, "UTF-8"); } Hold (IOException pre) {ex.printStackTrace (); Return tap; } MLDData of return; }  

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c++ - Redefined variable in the other module -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -