【发布时间】:2016-12-07 19:34:31
【问题描述】:
我正在尝试设置谷歌地图地理位置,而 JSLint 一直说“只读”。这段代码:
function geolocationSuccess(position) {
// Turn the geolocation position into a LatLng object.
location = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);
// Map that point.
map.setCenter(location);
}
【问题讨论】:
-
您有问题吗?
-
可能是在抱怨你设置
window.location。 -
@Jordan 是的,为什么 JSLint 会这么说,我该如何解决
-
@Srikanth 所以我会写同样的东西? /*全局arrayContainer:true*/
标签: javascript jslint