Reputation: 281
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.
Upvotes: 3
Views: 8973
Reputation: 191
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.
Upvotes: 5