小编hus*_*afa的帖子

未捕获的 ReferenceError:未定义信息窗口 #googleMaps API

我正在尝试将 Google 地图 API 集成到我的页面。我使用从 JSON 中提取位置并将该位置保存在数组中的代码,然后返回每个位置的位置数据。一切都很顺利,只是我infowindow在点击地图上的标记时无法激活该功能。这是点击时出现的错误:

在此处输入图片说明

var map;    // declares a global map variable


/*
Start here! initializeMap() is called when page is loaded.
*/
function initializeMap() {

  var locations;

  var mapOptions = {
    disableDefaultUI: true
  };

  /*
  For the map to be displayed, the googleMap var must be
  appended to #mapDiv in resumeBuilder.js.
  */
  map = new google.maps.Map(document.querySelector('#map'), mapOptions);


  /*
  locationFinder() returns an array of every location string from the JSONs
  written for bio, education, and …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps runtime-error

0
推荐指数
1
解决办法
5153
查看次数

标签 统计

google-maps ×1

javascript ×1

runtime-error ×1