问一个百度地图根据 “配送范围” 检索餐厅的功能
我用百度地图API在地图上画一个范围,商家的配送范围(我看了美团外卖的商家后台也是这样画一个配送范围的);
然后用户点餐时根据送餐地址,检索在配送范围内的餐厅,检索出当前有哪些餐厅可以配送?
这里需解决两个问题:
1:餐厅选范围,这个范围怎么保存呢,怎么样的数据格式呢,保存在百度地图上的云API吗?
2:根据用户位置怎么去检索被那些范围覆盖?这个搜索有百度地图的API接口吗?自己做感觉不可能啊?
解决了这两个问题,那么就拿到了餐厅,就可以了。
请问下百度地图有没有这样的API呢?
我猜想是不是百度地图有个API把问题一和问题二都给我解决了,百度提供一个地图云数据库帮我们检索啊?
在线等大神啊!
回复内容:
我用百度地图API在地图上画一个范围,商家的配送范围(我看了美团外卖的商家后台也是这样画一个配送范围的);
然后用户点餐时根据送餐地址,检索在配送范围内的餐厅,检索出当前有哪些餐厅可以配送?
这里需解决两个问题:
1:餐厅选范围,这个范围怎么保存呢,怎么样的数据格式呢,保存在百度地图上的云API吗?
2:根据用户位置怎么去检索被那些范围覆盖?这个搜索有百度地图的API接口吗?自己做感觉不可能啊?
解决了这两个问题,那么就拿到了餐厅,就可以了。
请问下百度地图有没有这样的API呢?
我猜想是不是百度地图有个API把问题一和问题二都给我解决了,百度提供一个地图云数据库帮我们检索啊?
在线等大神啊!
百度提供相关的Api,可以查阅百度地图开放平台下的LBS云相关条目。
不过百度提供的Api较少,功能相对有局限性,类似你这样的多边形查询目前好像还未提供。
如果条件允许,建议自行搭建一个mongodb作为辅助数据库来进行这方面的存储和查询,目前mongodb对地理位置的存储查询算得上最丰富的,对点、线、面的存储,多边形查询等都能很方便的接入和支持。
有个简单思路
1.对地图进行分割,比如用六边形或者正方形进行对地图进行完全分割
2.对分割之后的小块进行唯一编号
3.根据商家划定的范围记录覆盖区块编号
4.根据编号即可搜索可配送的餐厅
有没有有类似经验的人啊?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
