来这里是我最后的选择。我已经尝试联系插件的作者,但没有收到任何响应。
我正在使用map List Pro插件,它使用谷歌地图来显示地图上的图钉。我有这个插件安装了两个位置-我的Beta网站和现场的网站。这两个站点是相同的,但插件只能在Beta站点上工作。
在Google Chrome中查看控制台后,似乎JS for Google Maps出现了加载问题。
有什么办法解决这个问题吗?
http://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyCpLclBr3nawxJR3mVvjKQzCrRYVBoMjog&ver=4.6.2
Uncaught TypeError: Cannot read property 'firstChild' of undefined
at Object._.pg (js:86)
at new ug (js:87)
at new MapViewModel (maplistfront.js:633)
at Object.<anonymous> (maplistfront.js:2120)
at Function.each (jquery.js:2)
at HTMLDocument.<anonymous> (maplistfront.js:2117)
at i (jquery.js:2)
at Object.fireWith [as resolveWith] (jquery.js:2)
at Function.ready (jquery.js:2)
at HTMLDocument.K (jquery.js:2)这是MapListPro JS文件。
maplistfront.js:522 Uncaught TypeError: self.sortList is not a function
at Object.success (maplistfront.js:522)
at i (jquery.js:2)
at Object.fireWith [as resolveWith] (jquery.js:2)
at y (jquery.js:4)
at HTMLScriptElement.b.onload.b.onreadystatechange (jquery.js:4)它的实时版本可以在这里找到:http://beta.ctda.com/find-a-member/
发布于 2017-01-16 23:15:49
在maplistfront.js中,您可以:
/*ViewModel*/
function MapViewModel(mapObject, mapid) {
var self = this;
self.mapID = mapid;
self.MapHolder = $('#MapListPro' + self.mapID);
self.mapCanvas = $('#map-canvas' + self.mapID);当我打开你的链接时,我看到mapid是1,但在你的超文本标记语言中有:
<div class='prettyMapList above cf' id='MapListPro0'>
<!--The Map -->
<div id='map-canvas0' class='mapHolder'…所以$('#MapListPro' + self.mapID)最终寻找的是MapListPro1而不是MapListPro0。
我真的对这个Map List Pro插件一无所知,所以我不禁想知道为什么mapId是1而不是0 (或者为什么你的超文本标记语言附带了0而不是1)
我希望这能帮助你找到错误的根源。干杯~
https://stackoverflow.com/questions/41679265
复制相似问题