问题描述
我有一套先前获得的纬度&经度使用GIS应用程序的各个地方。
我要做的是......我想在地图上显示这些获得的经纬度,作为从当前位置到特定半径的标记。
I have set of previously obtained latitude & longitude using GIS application for various places.What i have to do is... I want to show these obtained lat-long on map as marker from my current location to certain radius.
说如果我的当前位置是-33.8665433,151.1956316和半径1000,那么我想显示所有获得的经纬度为该范围内的标记。
Say if my current location is -33.8665433, 151.1956316 and radius 1000 then I want to show all obtained lat-long as marker falling in this range.
这:有助于特定的地点类型。我没有预定义类型。
This : https://google-developers.appspot.com/maps/documentation/javascript/examples/place-search helps for specific defined place type. I don't have predefined type.
如何解决此问题?
感谢您的提前。
推荐答案
AppEngine上的地理查询问题是数据存储。即你不能在lat和lon上执行不等式查询,这基本上限制了geo-proximity查询。
The problem with geo-queries on AppEngine is that datastore limits inequality queries to at most one property. I.e. you can not perform an inequality query on both lat and lon , which basically limits the geo-proximity queries.
解决方案是您的数据:将地图拆分为离散网格并为每个象限提供一个ID。然后用适当的象限ID标记所有地方。
The solution is to geo-hash your data: break the map into discrete grid and give each quadrant an ID. Then also mark all places with the appropriate quadrant ID.
。还有一个Java库可以对AppEngine执行地理哈希处理:
An example of geo-hash on AppEngine. There is also a java library that performs geo-hashing on AppEngine: https://code.google.com/p/javageomodel/
这篇关于如何使用google map api在半径内进行客户经纬度地点搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!