[question] How to load & display KML
See original GitHub issueI have a KML layer of GPS tracks that I want to load and display on the map, how do I do it the React way with this?
I was able to get it working, but I had to use onGoogleApiLoaded
This is what I did:
onAPILoad({ map, maps }){
var KML = new maps.KmlLayer({
url: 'PATH_TO_KML'
});
KML.setMap(map);
}
render(){
return <GoogleMap {...props} onGoogleApiLoaded={this.onAPILoad} />;
}
Is there a proper way to use getMapOptions
? I couldn’t find anywhere in the docs/examples. If there isn’t is this a valid feature request?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Displaying KML | Maps JavaScript API - Google Developers
This tutorial shows you how to display information of a KML file in a Google map and sidebar. For more information on using...
Read more >Import KML map data into Google Earth - Computer
Import KML map data into Google Earth · On your computer, open Google Earth. · On the left, click Projects Projects . ·...
Read more >Displaying local file in Google Maps? - GIS Stack Exchange
Click Choose file , select the KML to upload, and then click Upload from file. My Maps (source: askdavetaylor.com). Create a new map....
Read more >Google Map won't load/display KML file - Stack Overflow
Don't use relative URLs in the KmlOptions for a KmlLayer. Use the complete absolute URL:
Read more >What if my KMZ/KML or Shapefile loads but does not display ...
This is because the built-in zip-utility on windows machines do not recognize a KMZ file as a zipped file. The most reliable way...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry I have no idea about what is KML and why do you need
getMapOptions
😉 Please see the sources to find the answer you need.I’m not using this library now in any of my work projects, so I’m not interested and have no time to somehow extend this library. I even have no time to support it well. May be in a future (but having that mapbox solutions beats google in every case I feel that such future will never come)