按城市、州或邮政编码进行邻近搜索

发布于 2024-10-04 15:09:08 字数 392 浏览 1 评论 0原文

由于某种原因,我们还没有这个功能。我们可以使用邮政编码使其工作,但是城市或州怎么样?模块的视图集非常棒,我希望看到邻近搜索选项得到扩展。 Drupal 论坛中有这样的请求:http://drupal.org/node/489904 但是线程已经停滞了几个月。使用“视图”和“位置”系列模块,“修复”不一致,并且在我这边不再起作用。有谁知道这个问题的解决方法? Drupal 论坛中显示的自定义模块在某些时候存在局限性,但现在不再显示任何搜索结果。尝试从任何角度解决这个问题——在 MySQL 数据库中为之前的配置提供美国邮政编码; Apache SOLR 已准备就绪;甚至还准备好了 Spatial SOLR(如果这种情况发生的话)。非常感谢任何帮助。

For some reason we still don't have this feature yet. We can make it work using zip codes, but how about City or State? The Views set of Modules are great and I would love to see Proximity Search options expanded. There are requests for this in the Drupal forums: http://drupal.org/node/489904 but that thread has been stagnant for months. The "fix" is inconsistent and no longer works on my end, using Views and Location series modules. Does anyone know a workaround to this issue? The custom module shown in Drupal forum worked at some point with limitations, but now its no longer displaying any search results. Trying to hit this from any angle -- have the US zipcodes in MySQL database for the former configuration; have Apache SOLR ready to go; even got Spatial SOLR ready to go if that ever picks up. Any help much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

白首有我共你 2024-10-11 15:09:08

我认为问题之一是城市名称不一定是唯一的。 (拉链是)
您可以在不同的州拥有同一个城市。

对于州来说,它的可靠性甚至更低,因为它们的面积可能变化很大,并且对于没有圆形形状的州来说,州周围的邻近搜索将非常不可靠。

因此,该模块应该有一个额外的步骤,显示“您的意思是……”结果,以防返回更多结果(如果可能)。

我不相信有解决方法,它需要一些编码才能在视图中实现这一点。

我将从 location.views.inc 大约第 493 行开始,调整当前邮政编码处理程序的逻辑。在 location.inc 中查找 location_latlon_rough 函数。

I think one of the problems is city names are not necessarily unique. (zips are)
You could have the same city in different states.

For states, it's even less reliable because their area can vary a great deal and proximity search around a state would be very unreliable for states which don't have circular shapes.

So the module should have an extra step showing "did you mean.." results in case there are more returned (if possible).

I don't believe there is a workaround, it will require some coding to implement this in views.

I would start in location.views.inc around line #493, adapting the logic for the current zipcode handler. Look for the location_latlon_rough function in location.inc.

堇年纸鸢 2024-10-11 15:09:08

可能你必须尝试 geoname 模块,我不确定你应该尝试

http://geonames.edesign.no/node /13

尝试一下,

谢谢,
戈壁:)

May be you have to try geoname module im not sure you should try

http://geonames.edesign.no/node/13

Give a try

Thanks,
Gobi :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文