Skip to content

Commit 6bcc11b

Browse files
authored
Merge pull request #21 from orcahmlee/doc/google-api-key
Added the info of Google API key on README
2 parents d20a71c + d2dd90a commit 6bcc11b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ Table of content
4141

4242
<!-- TOC -->
4343

44+
- [Table of content](#table-of-content)
4445
- [Overview](#overview)
4546
- [A glimpse at the API](#a-glimpse-at-the-api)
4647
- [Forward](#forward)
48+
- [Multiple queries ('batch' geocoding)](#multiple-queries-batch-geocoding)
4749
- [Multiple results](#multiple-results)
4850
- [Reverse](#reverse)
4951
- [House Addresses](#house-addresses)
@@ -90,7 +92,7 @@ Now lets use Geocoder to do the same task
9092

9193
```python
9294
>>> import geocoder
93-
>>> g = geocoder.google('Mountain View, CA')
95+
>>> g = geocoder.google('Mountain View, CA', key='YOUR_GOOGLE_API_KEY')
9496
>>> g.latlng
9597
(37.3860517, -122.0838511)
9698
```
@@ -103,7 +105,7 @@ Many properties are available once the geocoder object is created.
103105

104106
```python
105107
>>> import geocoder
106-
>>> g = geocoder.google('Mountain View, CA')
108+
>>> g = geocoder.google('Mountain View, CA', key='YOUR_GOOGLE_API_KEY')
107109
>>> g.geojson
108110
>>> g.json
109111
>>> g.wkt
@@ -145,7 +147,7 @@ Mountain View Post Office ['37.393', '-122.07774']
145147
### Reverse
146148

147149
```python
148-
>>> g = geocoder.google([45.15, -75.14], method='reverse')
150+
>>> g = geocoder.google([45.15, -75.14], method='reverse', key='YOUR_GOOGLE_API_KEY')
149151
>>> g.city
150152
>>> g.state
151153
>>> g.state_long
@@ -156,7 +158,7 @@ Mountain View Post Office ['37.393', '-122.07774']
156158
### House Addresses
157159

158160
```python
159-
>>> g = geocoder.google("453 Booth Street, Ottawa ON")
161+
>>> g = geocoder.google("453 Booth Street, Ottawa ON", key='YOUR_GOOGLE_API_KEY')
160162
>>> g.housenumber
161163
>>> g.postal
162164
>>> g.street
@@ -177,7 +179,7 @@ Mountain View Post Office ['37.393', '-122.07774']
177179
Accessing the JSON & GeoJSON attributes will be different
178180

179181
```python
180-
>>> g = geocoder.google("Ottawa")
182+
>>> g = geocoder.google("Ottawa", key='YOUR_GOOGLE_API_KEY')
181183
>>> g.bbox
182184
{"northeast": [45.53453, -75.2465979], "southwest": [44.962733, -76.3539158]}
183185

0 commit comments

Comments
 (0)