【发布时间】:2014-08-02 05:31:38
【问题描述】:
我正在使用 google places 自动完成 api,现在我想获取该地址的地理编码并在地图上显示该区域。这是我的代码...
<head>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
<script>
// This example adds a search box to a map, using the Google Place Autocomplete
// feature. People can enter geographical searches. The search box will return a
// pick list containing a mix of places and predicted search terms.
function initialize() {
var input = document.getElementById('searchTextField');
var autocomplete = new google.maps.places.Autocomplete(input);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<input id="searchTextField" type="text" size="50">
</body>
我知道有 google geocde api,但我真的不知道该怎么做。 我在wordpress中做这一切。有人知道这个吗???
【问题讨论】:
标签: wordpress google-places-api