Reputation: 1893
There are just one or two tutorials outhere about how to use gmaps-API in ember-cli.
See this: http://blog.atmartin.io/google-maps-integration-ember-cli-edition/
Unfortunately there are problems after a few days using this approach. When starting my application, it seems like nothing happens in the gmaps-api. When downloading the JS-File again like described within the tutorial
(curl -o vendor/gmaps.js https://maps.googleapis.com/maps/api/js?key=YOUR-KEY-HERE
)
from above, it works again.
Also I'm wondering about the async-Tag in the general approach from google itself. The GMaps Team shows examples of using GMaps like this:
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=YOUR-KEY-HERE&callback=initMap">
</script>
Upvotes: 2
Views: 2132
Reputation: 628
If your trying to use use the google maps API in a ember app i would highly recommend this Addon:
http://emberobserver.com/addons/ember-google-map
it works very well you can also find a demo here: http://huafu.github.io/ember-google-map/
and here is the wiki: https://github.com/huafu/ember-google-map/wiki
you can install it as an addon via:
ember install ember-google-map
Upvotes: 3
Reputation: 161404
That tutorials suggestion to copy the Google Maps Javascript API v3 to your local server:
curl -o vendor/gmaps.js https://maps.googleapis.com/maps/api/js?key=YOUR-KEY-HERE
is against the Google Maps Javascript API v3 terms of use and will not work reliably.
Upvotes: 2