Update documentation for Google Maps directive to mention 'Google maps JS include file'
Closed this issue · 3 comments
Add to the documentation for the Google Maps directive that:
"the Google Maps API JavaScript include file must be referenced/'installed' manually inside your 'index.html' file."
This might seem obvious, but as I am aware that Google Maps can be loaded on web pages without an API key, I didn't add in a reference to the Google Maps JavaScript include file, assuming that your library had taken care of that include somehow - and so I wasted an hour or two trying to figure out why it didn't work - when I finally decided to try adding in the JS include, lo and behold it worked. I had carefully followed all your 'Angular-UI' installation instructions, but nowhere is it mentioned that you need to add in the JS include - so suggest this is simply added to the documentation under the Google Maps directive section, as well as to the example.
Simply adding this was all that it required:
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
It seems that most uses should use an API key too though, it's a bit hazy from Google's documentation whether it is needed or not currently.
Also, I'm unclear if the include should be referenced in the <head> or <body> tag, or if it doesn't matter.
Also that v1.0.4 is required for Angular-UI (that 1.0.2 isn't sufficient).
Cheers
Matt
Also:
- add to documentation that 'map markers' on the Map directive require jQuery (this is not explained anywhere, jQuery is listed as 'optional' at the top of the documentation).
- Explain that Map Markers won't work with just the following, which the documentation seems to suggest should be possible:
<script src="components/angular-ui/common/module.js"></script>
<script src="components/angular-ui/modules/directives/jq/jq.js"></script>
<script src="components/angular-ui/modules/directives/map/map.js"></script>
What is the minimum required for markers to work, I have to use the full 'build' file currently (and I don't need all of it) to get them to work? I assume the same applies for 'info windows'.
Cheers
Matt
+1
I also wasted some time on this. Thanks for creating the issue!
Closing. Will have to be dealt with on the official repo.