全球定位自动完成输入 [英] Global location input autocomplete

查看:203
本文介绍了全球定位自动完成输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一个插件来创建具有建议的自动完成智能位置表单域。我无法找到合适的东西(谷歌地球code是对自己太不可靠,它不适合这个),所以我建立我自己的。我认为这是疯狂的,在2011年这样一个开源的全局位置输入插件不存在,所以下决心给它一个去。

I was looking for a plugin to create a smart location form field which has a suggested autocomplete. I was unable to find anything suitable (Google Geocode is too unreliable on its own, and it isn't designed for this) so I built my own. I thought it was crazy that in 2011 an open-source global location input plugin like this didn't exist so set out to give it a go.

该演示是在这里 http://labs.unxposed.net/unxposed/geo code / 并正在Chrome和Firefox 4下载在这里的https: //github.com/unxposed/geo$c$c

The demo is here http://labs.unxposed.net/unxposed/geocode/ and is working on Chrome and Firefox 4. Download is here https://github.com/unxposed/geocode

有是我与它有一个重大问题。有时它像这样的伟大工程。打字的潘基文在输入我得到的建议列表回来。该输入后自动填充与第一个建议后匹配的并输入文本的选择(很像Chrome地址栏)。

There is one major issue I am having with it. Sometimes it works great like so. On typing Ban in the input I get a list of suggestions back. The input is autofilled with the first suggestion back matching Ban and the input text after Ban is selected (much like the Chrome address bar).

不过,大部分时间在输入所选文本的自动填充变得未高亮显示,光标然后移动到输入端(这实在是烦人)。像现在这样 - 在我键入 Banbur

However, much of the time the autofill selected text in the input becomes unhighlighted and the cursor then moves to the end of the input (which is really annoying). Like so - after I type Banbur.

我是pretty肯定,如果我删除辅助源(谷歌地球code)该问题得到解决,自动填充/输入选择的伟大工程始终这是关系到谷歌地图,但为什么会出现这种情况,我怎样才能解决这个问题?

I am pretty sure this is related to Google Maps as if I remove the secondary source (Google Geocode) the issue is resolved and autofill/input select works great consistently, but why is this happening, and how can I fix it?

任何其他方面的改进/优化技术/建议将是pciated太大AP $ P $!

Any other improvements/optimisations/suggestions would be greatly appreciated too!

感谢

推荐答案

OSClass.org提供其主题为自由而有被自动填充所有区域位置自动完成。这个你可以在自己的演示检查并从他们的主题文件中下载code。
演示(登录并进入设置 - >位置部分): HTTP: //demo.osclass.org/general/oc-admin/index.php?page=login

OSClass.org provides its theme for free which has location autocomplete with all areas being populated automatically. This you can check in their demo and download the code from within their theme files. Demo (login and go to Settings->location section) : http://demo.osclass.org/general/oc-admin/index.php?page=login

这篇关于全球定位自动完成输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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