google-maps - 标记 setPosition 不起作用
问题描述
我有这个代码
var new = new google.maps.LatLng(lat, lng);
marker.setPosition(new);
infowindow.setPosition(marker.getPosition());
并且标记没有移动,但信息窗口移动了
我在控制台中没有错误
10天前还在工作,可以从5月11日更新吗?
解决方案
我的问题是最新版本
<script src="//maps.googleapis.com/maps/api/js?v=3.31&key=
以前是
<script src="//maps.googleapis.com/maps/api/js?v=3&key=...
https://developers.google.com/maps/documentation/javascript/versions
推荐阅读
- qt - QWindow::showMinimized() 不起作用,错误?
- android - 在 nativescript-vue 中混合全局和框架导航不起作用
- c# - 在winforms中将复选框插入工具条时出现问题
- python - lxml无法导入etree包
- javascript - Axios 无法在请求拦截器中添加/更新标头
- pytorch - torchtext 数据 build_vocab / data_field
- vue.js - 如何使用 vue 组件 js 和 axios router-view 在 laravel 中进行分页
- java - 无法将值放入 HashMap
- ios - 如何快速制作快捷方式?
- ios - Flutter:如何在安装/卸载期间删除 FlutterSecureStorage 项目