geocoder - c is undefined
geocoder - c is undefined
所以我在我的网站上使用了谷歌本身的例子:
var geocoder = new google.maps.Geocoder();
if (geocoder)
{
geocoder.geocode({ 'address': 'australia' }, function (results, status)
{
if (status == google.maps.GeocoderStatus.OK)
{
console.log(results[0].geometry.location);
}
else
{
console.log('No results found: ' + status);
}
});
}
但我得到一个错误"c未定义"有人能帮忙吗?
来自谷歌的脚本已成功添加到我的标题中。我已经在使用第二个脚本来显示地图,这确实有效。
如果您通过Firefox浏览器在Windows 2012服务器上运行地理编码javascript,我会收到相同的错误消息"c is undefined"。然而,它在IE和Chrome中运行良好。此外,如果我使用Firefox在Windows2003服务器上运行相同的脚本,它可以正常工作,不会给我错误。你试过这些浏览器吗?运行代码的服务器是什么?
您正在使用Firebug吗?如果是这样,请关闭它,您的脚本应该不会出错。
相关文章:
- Jquery - table.row(tr) is undefined
- noty.js is returning undefined
- $routeParams is undefined
- Angular js $scope is Undefined
- $scope is coming as undefined
- Angular - $cookies is undefined
- TypeError: e is undefined - javascript
- “google.maps.MapTypeId is undefined”在FF 14中使用GMAP3时
- chrome.storage.local["mykey"] is undefined
- 回调在 Angular2/Firebase 中生成“TypeError: this is undefined”
- KendoWindow .visible(); is undefined?
- jQuery .forEach() 导致错误,“undefined is not a function”
- 使用“flickrnode”API时出现“TypeError: undefined is not a function”
- "undefined is not a function" onSuccessHandler
- 莫名其妙的“Undefined is not a function”错误 — 由“getElementsById”引起
- Angular js 在传递 promise 时$asyncValidator“Undefined is not a f
- undefined is not a function when evaluating 'this.batman
- “uncatch TypeError: undefined is not a function” 在使用 str.ind
- 谷歌地图API(使用gmapsjs), setCenter抛出“undefined is not a function”
- 在骨干应用视图中出现" Uncaught TypeError: undefined is not a function