【发布时间】:2012-05-20 17:00:25
【问题描述】:
我正在使用 google API 来自动完成用户地址的功能。并且工作正常。 但现在我想使用诺基亚 OVI 地图来实现地址自动完成功能。
请帮助我如何实现。
我正在使用下面的代码
<div id="customSearchBox" class="main-search">
<span class ="caption">Search For Places:</span>
<div module="SearchBox">
<input rel="searchbox-input" class="search-box-bckgrnd" type="text" />
<div rel="searchbox-list" class="search-list"></div>
</div>
</div>
<script>
var customSearchBox = new nokia.places.widgets.SearchBox({
targetNode: 'customSearchBox',
template: 'customSearchBox',
searchCenter: function () {
return {
latitude: 52.516274,
longitude: 13.377678
}
},
onResults: function (data) {
//here you have access to data
alert(data);
}
});
</script>
如何在这段代码中获得经纬度
谢谢 希瓦姆
【问题讨论】:
标签: javascript map autocomplete here-api