Skip to main content

通过调用第三方地图接口, 处理与地图相关应用. 目前仅支持百度地图, 期待支持更多地图应用.

使用方法:

  • 获取地址地理坐标

    >>> 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)
    

安装方法:

pip install mapapi

Release files for mapapi 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mapapi 0.2.5
File Size Uploaded
mapapi-0.2.5.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mapapi 0.2.5
File Interpreter ABI Platform
mapapi-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / mapapi-0.2.5.tar.gz

Download URL mapapi-0.2.5.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e5ad811d8bc04dc55a2176ac5d01e99a59ea8b5409da9a5e2342e1d62a1cb380
BLAKE2b-256 checksum
How to use checksums
7d1353fe3430c3d39934ea26c07d37c706e866cb93c004c1482e5054615c2352
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.4

Release files / mapapi-0.2.5-py3-none-any.whl

Download URL mapapi-0.2.5-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dff6adc4a24b68c259bdd4458c741fc85862c7ecc6d46de6020f73a992b4cc1
BLAKE2b-256 checksum
How to use checksums
783a8fced9159e3bb90f22577faca9f4e9b7caa21ea690900aa48e32849140bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

1 release file

0.2.3

2 release files

0.2.2

2 release files

0.2.1

1 release file

0.2

3 release files

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page