How to load local kml file into html google map page with using javascript

Salman Khatri

Junior Member
Joined
Jan 3, 2021
Messages
105
Reaction score
30
Hi guys.
I have problem , in google earth i have draw polygon with different different areas. and save this information in kml file and export kml file from google earth
now I need to show that kml file to my website where I use google map page with using javascript everything map is loading fine but my kml file does not loading. infact for testing purpose while am load mine file to load online version which is provide by google , there is also upload fine and showing all data of polygon.
please help me if anyone know that how to load local kml file in google map with using javascript.
 
You can't load a local file. You must upload it on your website. Here is an example.
Code:
https://developers.google.com/maps/documentation/javascript/kml
 
I want that , User can upload its kml file and view polygon , places all data which is saved in kml
and file should not any google drive or other web hosting.

yes , but my program will host on live site then user can upload

is that possible ?
 
I want that , User can upload its kml file and view polygon , places all data which is saved in kml
and file should not any google drive or other web hosting.

yes , but my program will host on live site then user can upload

is that possible ?
Yes that is possible. You should code one. I've already sent you a link. You can use that and you need to code the upload part and then pass the file to KML viewer.
 
I have alredy create all thing but the problem is that my side is not working
that is issue
I have many try to view kml file own my google map page's code
but still am not achieve result, so that why am write here if any good developer here , so he can help me
 
Post in HAF. Someone will help you in exchange for moneys.
 
Back
Top