google.maps.Geocoder() getting null in cordova 2.6

混江龙づ霸主 提交于 2019-12-11 19:14:39

问题


I'm using geocoder in my phonegap project. This is working fine in when im using cordova 1.7 but when I changed the cordova version to 2.6, it is returning undefined..

Any idea what am I missing?

var geocode= new google.maps.Geocoder()


回答1:


use var geocode = new google.maps.Geocoder();

When creating any object of class (of course Javascript has only objects), use new to instantiate.



来源:https://stackoverflow.com/questions/16805614/google-maps-geocoder-getting-null-in-cordova-2-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!