Anyone know if its possible to use the google geocoder API from a Lightning component?
Using visual force and javascript I have can make use of google maps goecoder API to get the geolocation of addresses.
So in Visualforce
and javascript
I import the google maps api JS library like so...
<script src="https://maps.googleapis.com/maps/api/js"></script>
And then later on I make use of the google geocoder...
var geocoder = new google.maps.Geocoder();
geocoder.geocode( {'address': address }, function(results, status) {
response(
/* code to handle the geocoder response */
}));
But it appears I can't do use the same technique in a Lightning component as Lightning forces you to use <lntg:require>
and you are limited to static resources. I can't find a way to make the google maps api js
work as a static resource, mainly because it imports other javascript.
Kind regards
David Smith