如何获得使用Google Map API的两个城市之间的地点 [英] How to get places between give two city using Google Map API

查看:99
本文介绍了如何获得使用Google Map API的两个城市之间的地点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个项目,我的任务是获得给定两个城市之间的地点总数。
例如,我输入city1和city2,我希望获得甲骨文公司的所有公司办公地址及其完整地址。



当我我正在使用谷歌地图API,它只显示了不是在两个城市之间的特定城市。

任何人对此有任何想法。请帮助我。

解决方案

首先,需要定义between之间的实际含义。从A开始到B结束的某个宽度的走廊可能就是这个结果。
一旦建立了这个定义,您可以使用一个支持GEO查询的数据库来获取该地区所有的地点条目。



google maps API会仅用于向用户显示数据并帮助您选择城市。



有一个图书馆可以帮助您检测天气中某个点是否在多边形内(您的corrdior)
https://github.com/tparkin/Google-Maps -Point-in-Polygon
这将是另一种获得客户城市之间积分的方法。


I am working on a project, My task is to get the total no of places between given two city. For example, I enter "city1" and "city2" and i want to get all the corporate office of Oracle Company with their complete address.

When i am using google map api, it shows only for a particular city not between two cities.

anyone have any idea about this. Please help me.

解决方案

First of all there needs to be a definition of what "between" actually means. Probably a corridor with a certain width starting from A and ending at B will be the result of that. Once this definition has been established you can use a database that supports GEO querys to get all your places entries contained within this region.

The google maps API would only be used to display Data to the user and aid in the selection of the cities.

There is a library that aids in detecting weather a point is inside a polygon (your corrdior) https://github.com/tparkin/Google-Maps-Point-in-Polygon That would be another ways to get the points between your cities on the client.

这篇关于如何获得使用Google Map API的两个城市之间的地点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆