Skip to main content

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)
    

安装方法:

pip install mapapi

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.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapapi-0.2.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file mapapi-0.2.3.tar.gz.

File metadata

  • Download URL: mapapi-0.2.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for mapapi-0.2.3.tar.gz
Algorithm Hash digest
SHA256 a722be7694a1db818b7ff9a00e8d00baeae2eb35a59c7cc0cdfd9a29b94f6808
MD5 1f7951a6b1fedd00e4db273a465a1c85
BLAKE2b-256 51642e5d4f5dfbdc28bb9342297fd0aa891ce64b68247d7d395d9a551e60ab1a

See more details on using hashes here.

File details

Details for the file mapapi-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: mapapi-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for mapapi-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c63292dc45ad88a9031850209974c2f9b6c21e5cb6cda251a1fd3fdde991afb6
MD5 14c6adc99cf933c8d5acc2eb2f6c6d42
BLAKE2b-256 cc65aab0d25187c0c575f92a28e1420d157b3017c686af5797810061d64f1152

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page