I 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?
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.
@istarkov I would also love to see support for KML files. KML is a layer file, which is used when you export maps from the Google MyMaps UI. This would allow users to easily create maps using the Google MyMaps UI, export them, and import them into their Google-Maps-React project.
Please let me know if there is any possibility of this happening since my current project somewhat depends on it.
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)