2

Is there any way to load the KML file and display the map location according to the KML file design in android application using google maps if possible can some one please guide me to do so.

Thank you.

Krrish
  • 271
  • 3
  • 17
  • Duplicate with http://stackoverflow.com/questions/4096142/adding-a-kml-layer-to-an-android-maps-application – MKer Oct 14 '15 at 11:59

1 Answers1

4

Google has a beta utility library for doing this, which can be found here:

https://developers.google.com/maps/documentation/android/utility/kml

If you have the library imported all you need to do is

KmlLayer layer = new KmlLayer(getMap(), R.raw.kmlFile, getApplicationContext()); 
layer.addLayerToMap();

Assuming you have the Google Maps object and a local kml file in your raw folder.

wrldbt
  • 181
  • 2
  • 13