Skip to content

Commit

Permalink
Update Baidu docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Mar 1, 2015
1 parent 954c3fe commit ce6a7a0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 56 deletions.
24 changes: 7 additions & 17 deletions docs/providers/Baidu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,22 @@
Baidu Maps Geocoding API is a free open the API, the default quota
one million times / day.

## Python Example
## Examples

**Basic geocoding**

```python
>>> import geocoder
>>> g = geocoder.baidu('中国')
>>> g.latlng
[37.550339474591, 104.11412925348]
>>> g.json
...
```

## Geocoder Attributes

- encoding
- lat
- lng
- location
- ok
- provider
- quality
- status

## Parameters

* :param location: Your search location you want geocoded.
* :param key: Baidu API key.
* :param referer: Baidu API referer website.
- `location`: Your search location you want geocoded.
- `key`: Baidu API key.
- `referer`: Baidu API referer website.

## References

Expand Down
49 changes: 10 additions & 39 deletions geocoder/baidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,16 @@ class Baidu(Base):
Baidu Maps Geocoding API is a free open the API, the default quota
one million times / day.
API Reference
-------------
http://developer.baidu.com/map/index.php?
title=webapi/guide/webservice-geocoding
Get Baidu key
------------
http://lbsyun.baidu.com/apiconsole/key
OSM Quality (0/6)
-----------------
- [ ] addr:housenumber
- [ ] addr:street
- [ ] addr:city
- [ ] addr:state
- [ ] addr:country
- [ ] addr:postal
Attributes (8/18)
-----------------
- [ ] accuracy
- [ ] address
- [ ] bbox
- [ ] city
- [ ] confidence
- [ ] country
- [x] encoding
- [ ] housenumber
- [x] lat
- [x] lng
- [x] location
- [x] ok
- [ ] postal
- [x] provider
- [x] quality
- [ ] state
- [x] status
- [ ] street
Params
------
:param location: Your search location you want geocoded.
:param key: Baidu API key.
:param referer: Baidu API referer website.
References
----------
API Documentation: http://developer.baidu.com/map
Get Baidu Key: http://lbsyun.baidu.com/apiconsole/key
"""
provider = 'baidu'
method = 'geocode'
Expand Down

0 comments on commit ce6a7a0

Please sign in to comment.