djtommek/mapycz-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

djtommek/mapycz-api

最新稳定版本:2.0.2

Composer 安装命令:

composer require djtommek/mapycz-api

包简介

Unofficial PHP 8 API wrapper for making requests to Mapy.cz

README 文档

README

Simple API wrapper for making requests to Mapy.cz created by the Czech company Seznam.cz. No API credentials are required.

Packagist Version GitHub Repo stars

Installation

composer require djtommek/mapycz-api

Usage example

<?php
$api = new \DJTommek\MapyCzApi\MapyCzApi();
$place = $api->loadPoiDetails('base', 2107710);
printf('lat: %F, lon: %F', $place->getLat(), $place->getLon());
// lat: 50.132131, lon: 16.313767

See tests or examples for more.

Testing

composer test

Note: The tests are making actual requests to the Mapy.cz website.

Detailed info

Mapy.cz frontend is communicating with backend via FastRPC requests and responses, which are XML-RPC binary encoded by their own custom encoder written in Javascript. See github.com/seznam/fastrpc or seznam.github.io/frpc.

Instead of creating PHP implementation of this FastRPC encoder/decoder, this wrapper is using HTTP headers:

  • Content-Type: text/xml to send requests using classic formatted in XML-RPC.
  • Accept: application/json to receive responses in JSON.

Disclaimer

  • Mapy.cz can change any time without any warning.
  • Personally, I would recommend not making extensive or malicious requests to prevent being banned. More info can be found on api.mapy.cz.

统计信息

  • 总下载量: 1.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2020-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固