为什么Google Maps API中未定义我的Maps对象

保罗·雷基尔(Paul T.Rykiel)

这是我的代码:我只想从输出中检索纬度和经度。但我不断收到未定义“地图”的错误。

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script type="text/javascript">

        var address = "200 South Michigan, Chicago, IL";
        // Gets the geographic coordinates for Chicago.
        var response = Maps.newGeocoder().geocode(address);
        for (var i = 0; i < response.results.length; i++) {
            var result = response.results[i];

        }
    </script>
iH8

该类称为Geocodernot,newGeocoder并且在google.mapsnot对象上可用Maps您需要使用new关键字创建一个新实例之后,您可以geocode在实例上调用method

 var geocoder = new google.maps.Geocoder();

 geocoder.geocode(address);

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Google Maps API返回“未定义”

来自分类Dev

为什么在使用 Google Maps API 时全局设置的 JS 变量显示为未定义?

来自分类Dev

Google Maps API 3-类型错误:a未定义

来自分类Dev

Google Maps API gm_bindings_未定义

来自分类Dev

Google Maps API gm_bindings_未定义

来自分类Dev

Google Maps api标记未定义错误

来自分类Dev

很难让Google Maps在Ionic中显示-“未定义Google”

来自分类Dev

Google Maps集成中的“未定义rd”错误

来自分类Dev

Google Maps集成中的“未定义rd”错误

来自分类Dev

google.maps.places未定义

来自分类Dev

Google Maps Geocoder未定义

来自分类Dev

未定义Google Maps功能

来自分类Dev

Google Maps Geocoder未定义

来自分类Dev

Google Maps API 3中未定义标记的javascript数组

来自分类Dev

使用angular2-google-maps和google places搜索栏未定义google对象

来自分类Dev

为什么Google Maps不能适应我的UIView?

来自分类Dev

为什么Google Maps摄像头不在我的位置?

来自分类Dev

为什么Google Maps摄像头不在我的位置?

来自分类Dev

Google Maps Places:为什么需要API密钥?

来自分类Dev

为什么Google Maps api的python代码无法突然工作

来自分类Dev

Google Maps Places:为什么需要API密钥?

来自分类Dev

Google Maps Api v3标记。Google未定义

来自分类Dev

为什么未在Google Maps(JavaScript)中显示此SVG?

来自分类Dev

ReferenceError:使用angular-google-maps时未定义_

来自分类Dev

带有Dart的Google Maps:保留功能未定义

来自分类Dev

Google Maps-从未定义的函数返回getPosition

来自分类Dev

Google Maps API v3 Heatmaps错误:“无法读取未定义的属性'HeatmapLayer'”

来自分类Dev

Google Maps API JS V3:infowindow.getPosition()==未定义?

来自分类Dev

Google Maps JS API(v3)InfoWindow脚本错误-JSON未定义

Related 相关文章

  1. 1

    Google Maps API返回“未定义”

  2. 2

    为什么在使用 Google Maps API 时全局设置的 JS 变量显示为未定义?

  3. 3

    Google Maps API 3-类型错误:a未定义

  4. 4

    Google Maps API gm_bindings_未定义

  5. 5

    Google Maps API gm_bindings_未定义

  6. 6

    Google Maps api标记未定义错误

  7. 7

    很难让Google Maps在Ionic中显示-“未定义Google”

  8. 8

    Google Maps集成中的“未定义rd”错误

  9. 9

    Google Maps集成中的“未定义rd”错误

  10. 10

    google.maps.places未定义

  11. 11

    Google Maps Geocoder未定义

  12. 12

    未定义Google Maps功能

  13. 13

    Google Maps Geocoder未定义

  14. 14

    Google Maps API 3中未定义标记的javascript数组

  15. 15

    使用angular2-google-maps和google places搜索栏未定义google对象

  16. 16

    为什么Google Maps不能适应我的UIView?

  17. 17

    为什么Google Maps摄像头不在我的位置?

  18. 18

    为什么Google Maps摄像头不在我的位置?

  19. 19

    Google Maps Places:为什么需要API密钥?

  20. 20

    为什么Google Maps api的python代码无法突然工作

  21. 21

    Google Maps Places:为什么需要API密钥?

  22. 22

    Google Maps Api v3标记。Google未定义

  23. 23

    为什么未在Google Maps(JavaScript)中显示此SVG?

  24. 24

    ReferenceError:使用angular-google-maps时未定义_

  25. 25

    带有Dart的Google Maps:保留功能未定义

  26. 26

    Google Maps-从未定义的函数返回getPosition

  27. 27

    Google Maps API v3 Heatmaps错误:“无法读取未定义的属性'HeatmapLayer'”

  28. 28

    Google Maps API JS V3:infowindow.getPosition()==未定义?

  29. 29

    Google Maps JS API(v3)InfoWindow脚本错误-JSON未定义

热门标签

归档