Skip to content

Commit a4e8c7d

Browse files
committed
Updating README
Corrected grammar. Added script to include ngMap from Bower. Switched to https for Google maps links!
1 parent aa80626 commit a4e8c7d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ For Bower users,
3838

3939
`$ bower install ngmap`
4040

41-
1. Include `ng-map.min.js` as well as google maps.
41+
1. Include `ng-map.min.js`:
42+
`<script src="/bower_components/ngmap/build/scripts/ng-map.min.js"></script>`
43+
44+
2. Include Google maps:
4245
`<script src="http://maps.google.com/maps/api/js"></script>`
4346

44-
2. name angular app as ngMap, or add it as a dependency
47+
2. Name your angular app ngMap, or add it as a dependency
4548

4649
`var myApp = angular.module('myApp', ['ngMap']);`
4750

48-
To get map instance, use `NgMap.getMap()` function
51+
To get the map instance use the `NgMap.getMap()` function
4952

5053
app.controller('MyController', function(NgMap) {
5154
NgMap.getMap().then(function(map) {
@@ -57,17 +60,17 @@ To get map instance, use `NgMap.getMap()` function
5760

5861
Lazy Loading of Google Maps Javascript
5962
---------------------------------------
60-
Simply wrap the map tag with `map-lazy-load="http://maps.google.com/maps/api/js"`.
63+
Simply wrap the map tag with `map-lazy-load="https://maps.google.com/maps/api/js"`.
6164

62-
<div map-lazy-load="http://maps.google.com/maps/api/js">
65+
<div map-lazy-load="https://maps.google.com/maps/api/js">
6366
<ng-map center="41,-87" zoom="3"></ng-map>
6467
</div>
6568

6669
If you need to pass in an API key to the javascript, you can set a scope
67-
variable in your controller (e.g. `$scope.googleMapsUrl="http://maps.google.com/maps/api/js?v=3.20&client=XXXXenter-api-keyXXXX";`).
70+
variable in your controller (e.g. `$scope.googleMapsUrl="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE";`).
6871
This can be set from a constant value in your app to standardise the API key to pass to google for multiple controllers.
6972

70-
<div map-lazy-load="http://maps.google.com/maps/api/js"
73+
<div map-lazy-load="https://maps.google.com/maps/api/js"
7174
map-lazy-load-params="{{googleMapsUrl}}">
7275
<ng-map center="41,-87" zoom="3"></ng-map>
7376
</div>
@@ -116,7 +119,7 @@ Contributing
116119
- Change to the folder dowloaded
117120
- **npm install** to install the build tools
118121
- **gulp build** to build the javascript & doc files in the /build folder & run the unit tests.
119-
- **gulp clean** to cleanup the repository from a previous build ? does this work ?
122+
- **gulp clean** to cleanup the repository by removing files and folders from previous build.
120123
- **gulp test** to run the Karma unit test suite.
121124
- **gulp test:e2e** to run the Protractor test suite. For the first test run, you may need to update the protractor webdriver manager. It will show the command on screen if this is required (node_modules/gulp-protractor/node_modules/protractor/bin/webdriver-manager update).
122125
- **gulp test:server** will start a web server for the testapp on http://localhost:8888

0 commit comments

Comments
 (0)