Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open local KML File in Google Maps on Android

Tags:

I have loaded a KML file onto an Android device. What's the easiest mechanism for loading an overlay of that KML file into Google Maps? I do not want to upload the KML file to the web but would rather open it locally.

like image 855
ahsteele Avatar asked May 28 '10 17:05

ahsteele


People also ask

Can I open KML file in Google Maps?

Use Google Earth to open KML files You can view most simple KML files with Google Earth for Chrome (version 9) or in the Google Earth app on your mobile device. If you're unable to view complex KML files, use Google Earth for desktop (version 7), which supports all KML features.

How do I convert a KML file to Google Maps?

Static KML Download a static copy of the map for viewing in Google Earth. Open the downloaded file in Google Earth, email the file to your friends, or upload it to your website to share. While looking at the map, choose File > Download. Select KML.

How do I import a KMZ file to Android map me?

Tap the file with bookmarks (KML or KMZ format) → choose "Open with MAPS.ME" in the pop-up window (if you have no other apps that support KML files, the file will be instantly open in MAPS.ME). Alternatively, you can copy KML files to the app folder.


2 Answers

To load kml into Google Maps on Android without writing an app, you can create a little html file somewhere with a geo-uri link to the kml file and then click on that link in any Android web browser.

For example: suppose your kml file is located in /sdcard/overlay.kml then you write a geo-uri link like this:

<html>
<head><title>Example KML link page using a geo-uri</title></head>
<body>
  <a href="geo:0,0?q=file:///sdcard/overlay.kml">overlay.kml</a>
</body>
</html>

Clicking on the link will launch Maps and then Maps will attempt to load and your kml.

(Obviously if your kml file is on a web server the file:// part can be replaced with http:// servername)

Be warned however that the Android version of Maps does not appear to handle the same version/range of kml elements as the desktop version (or desktop Google Earth).

like image 84
gb96 Avatar answered Sep 20 '22 11:09

gb96


I cannot tell about older Android versions, but on Nexus 4 with Android 4.2.2 this is very easy:

  • Transfer the KML file to your Android device and store it on your SD card by any means (USB, eMail, PAW app,...)
  • Use some file manager app (e.g. Solid Explorer, Astro, ...) to locate the file in the file system and click it.
  • Google Earth will pop up and the KML file will be displayed on top of the Earth satellite image.

In Earth you can also tap on any KML objects to display associated information (if any is stored in the KML file).

like image 22
Jpsy Avatar answered Sep 22 '22 11:09

Jpsy