0

How do I integrate Google Earth into my website?

I have done a lot of researching on it but nothing helps me out.

I want to plot some lat, lon stored in MySQL database into Google Earth. As I understand Google Earth takes only KML or KMZ files.

So, I have to convert this files into KML or KMZ which can be done but I am stuck here, i.e at plotting this file into Google Earth.

  • You say you've converted from the database to KML/KMZ, but where have these files gone? Somewhere on your web server? What's your web server running? PHP? Do you need to return a response with the KML and a correct Mime Type header so the user's web browser starts up Google Earth? – Spacedman Oct 5 '18 at 8:49
-1

In Google Earth, click on 'Menu' (1st icon). Go to 'Settings' (the usual cog icon) and scroll down to 'Enable KML' - and ensure that it is enabled. Then go to 'My Places' in the menu or (5th icon down in the original start screen on the left). Click 'Import KML File' and it will give you an option of 'from file' or 'from google'.

Once you have enabled KML import, you won't need to keep repeating that (unless you use a different browser or delete your cookies). From now on you can just go straight to My Places.

  • How does this answer the question of how to get data from a MySQL database into Google Earth? – Spacedman Oct 5 '18 at 8:47
  • He says he has converted it to KML and wants to know how to plot KML on Google Earth (read the OP's final paragraph). – MappaGnosis Oct 5 '18 at 8:49
  • But where does the "integrated with my website" come in? Its not clear what's going on, so I've commented and once the OP clarifies I'll retract. If it a case of "How do I load a KML/KMZ into Google Earth" then maybe you'll get an accept. Lets see. – Spacedman Oct 5 '18 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.