百度地图个性化地图V2,报Cannot read property 'parentElement' of undefined错误

做一个项目过程使用到百度地图个性化地图,使用方法map.setMapStyleV2({styleJson:styleJson});
报错:Cannot read property ‘parentElement’ of undefined,参考了链接https://blog.csdn.net/u013455430/article/details/80528931把该方法移至最后依然无效,几经周折终于找到坑点所在://map.centerAndZoom(“杭州市”,12);——不能用,必须使用坐标点
修改为map.centerAndZoom(new BMap.Point(120.219375416,30.2592444615),12)后map.setMapStyleV2({styleJson:styleJson})生效

Cannot read property 'parentElement' of undefined问题解决相关推荐

  1. Vue+elementUI开发中 Cannot read property ‘resetFields‘ of undefined 问题解决以及原因分析

    有个添加数据与编辑数据的功能.为了减少代码量,两者使用了同一个dialog,通过不同按钮点击使用对应的方案进行显示. 在添加数据的按钮的click事件中直接写入了resetFields. 之后正常运行 ...

  2. 页面[components/listCard/listCard]错误: TypeError: Cannot read property ‘name‘ of undefined 问题解决

    页面[components/listCard/listCard]错误: TypeError: Cannot read property 'name' of undefined 这个问题非常的坑 因为我 ...

  3. 记一次前端问题解决历程(Cannot read Property ‘call‘ of undefined)

    记一次前端问题解决历程(Cannot read Property 'call' of undefined) 参考文章: (1)记一次前端问题解决历程(Cannot read Property 'cal ...

  4. TypeError: Cannot read property ‘publish‘ of undefined“报错问题解决

    TypeError: Cannot read property 'publish' of undefined" VUE项目启动之后相应的事件没反应,进入浏览器开发者模式发现报错信息,根据错误 ...

  5. 事件监听一直报错Cannot set property 'display' of undefined

    为什么80%的码农都做不了架构师?>>>    css ↓ .wechatBtn {position: relative;} .wechat {position: absolute; ...

  6. JS报错:Cannot read property 'type' of undefined

    在做图片上传功能的时候,遇到了JS无法识别图片type的问题,在使用过程中是没有问题的,但是不知道为什么浏览器的Console报这个错误: Uncaught TypeError: Cannot rea ...

  7. 解决“TypeError: Cannot read property ‘_wrapper‘ of undefined“问题

    解决VUE相关报错问题,"TypeError: Cannot read property '_wrapper' of undefined" 报错信息 vue.js:635 [Vue ...

  8. chrome浏览器不能录音:Uncaught TypeError: Cannot read property ‘getUserMedia‘ of undefined解决方法

    Uncaught TypeError: Cannot read property 'getUserMedia' of undefined解决方法 javascript 打不开浏览器录音功能的问题解决方 ...

  9. 使用JQuery Validate插件的报Cannot read property 'settings' of undefined错误的解决方法

    一.问题描述: 因为最近在做动态表单,很多字段需要动态添加验证,而我在动态添加删除校验规则时,浏览器经常报Cannot read property 'settings' of undefined,每次 ...

最新文章

  1. 计算机小白学UI,小白学UI设计有什么技巧?看完这些你就明白了
  2. 容斥原理(二进制枚举)
  3. 什么是 SAP UI5 的 Component-preload.js, 什么是Minification和Ugification
  4. 20165222第一周查漏补缺
  5. xCode 安装Mobile Device Framework出错的问题的解决方法
  6. 小汤学编程之jQuery学习day03——事件、效果、插件
  7. CreateThread、_beginthread与AfxBeginThread的区别及其注意事项
  8. STM32学习——高级定时器
  9. Windows手机开发工具与资源
  10. 简单理解L0、L1与L2范数
  11. paip.点击每个网页链接都提示下载的解决。
  12. 二级下拉菜单缓慢渐变
  13. linux查看设备pid vid,Linux设备PID VID详细说明
  14. 彩色飘带字体怎么制作?AE教程教给你
  15. FxFactory 7 for Mac(视觉特效软件包)
  16. laravel 下载public目录下文件
  17. Signal protocol 开源协议理解
  18. 聚合支付码是什么意思及它产生的背景
  19. 稀疏矩阵 c语言,C语言数据结构 稀疏矩阵
  20. java 中的poi_Java中使用POI操作ExceL的读与

热门文章

  1. sonos one和play1对比哪个好?评测sonos one和play1区别是什么?
  2. 如何用Python绘制好看的词云代码?个人总结
  3. 如何在 Linux 系统启用 UEFI 的 Secure Boot
  4. 计算机怎么查询隐藏的字体,如何隐藏电脑桌面图标下的文字
  5. 这篇文章告诉你改变声音的工具有哪些
  6. nginx服务器配置ssl协议,国密SSL协议之Nginx集成
  7. 恶魔语言java_说地道的Java语言(译)
  8. oracle中嵌套函数,Oracle的嵌套函数语法
  9. Android操作系统发展史
  10. 网络爬虫pyppeteer、selenium模拟浏览器抓取数据