map web api, current support baidu
Project description
通过调用第三方地图接口, 处理与地图相关应用. 目前仅支持百度地图, 期待支持更多地图应用.
使用方法:
获取地址地理坐标
>>> from mapapi import baidu >>> map_api = baidu.MapApi(['your application key', ...]) >>> location = map_api.location_api.get_location_by_address(u'百度大厦', u'北京') >>> print location
获取地理坐标对应的详细地址
>>> from mapapi import baidu >>> map_api = baidu.MapApi(['your application key', ...]) >>> address = map_api.location_api.get_address_by_location({'lng': 116.322987, 'lat': 39.983424}) >>> print address
获取标准化地址信息
>>> from mapapi import baidu >>> map_api = baidu.MapApi(['your application key', ...]) >>> address = map_api.location_api.get_formatted_address(u'北京市海淀区百度大厦') >>> print address
通过关键词查询所有地名或店铺等信息
>>> from mapapi import baidu >>> map_api = baidu.MapApi(['your application key', ...]) >>> ret = map_api.place_api.get_place_all(u'银行', u'济南') >>> print ret
通过百度地图uid信息获取对应的地址信息
>>> from mapapi import baidu >>> map_api = baidu.MapApi(['your application key', ...]) >>> place = map_api.place_api.get_place_by_uids('c14fc238f7fadd4ea5da390f') >>> print place
将腾讯地图坐标转换成百度地图坐标
>>> from mapapi import baidu >>> map_api = baidu.MapApi(['your application key', ...]) >>> coords = map_api.transform_api.transform({'lat': 29.5754297789, 'lng': 114.218927345}) >>> print coords
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mapapi-0.2.tar.gz
(1.8 kB
view details)
Built Distributions
mapapi-0.2.0-py3-none-any.whl
(16.6 kB
view details)
mapapi-0.2-py2-none-any.whl
(3.2 kB
view details)
File details
Details for the file mapapi-0.2.tar.gz
.
File metadata
- Download URL: mapapi-0.2.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf0420ecc08055a689fc9c384c44d250f5f27659ac72fcac43f4f71a74c912e |
|
MD5 | 26dc71b809cb5bda6bff4103a644f2d8 |
|
BLAKE2b-256 | d62f72715769154c0868b3c0de39d921c6793b3363c1a6682244c62e64e11f0e |
File details
Details for the file mapapi-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mapapi-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b72394951049c2ae26f591dce940a9328e25c72f639dcfbdd4cdd6f6a0a8da6 |
|
MD5 | c3b8851ac8532a6b8681e9869745cf45 |
|
BLAKE2b-256 | 73de0d3a139c044034826abd8f3aa97154358cccfa84d3e2108743da6900063c |
File details
Details for the file mapapi-0.2-py2-none-any.whl
.
File metadata
- Download URL: mapapi-0.2-py2-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4193b0514812e534eec7a68b03f52b2ab39eb44a864c5abeda290d76bf90117c |
|
MD5 | 36afc92f28d485e3eacfa04700c63238 |
|
BLAKE2b-256 | 16c0d503531c2d8a5bc2b1c57587be678638d92b24556f5d792cd88f34b92d3f |