Javascript 谷歌地图加载错误“;谷歌";未定义
好的,我在加载地图时遇到了一个问题,这部分将显示“google”为Javascript 谷歌地图加载错误“;谷歌";未定义,javascript,google-maps,Javascript,Google Maps,好的,我在加载地图时遇到了一个问题,这部分将显示“google”为未定义的 var polyline = [ new Google.map.LatLng(3.032617, 101.376), new Google.map.LatLng(3.03255, 101.3759), new Google.map.LatLng(3.032467, 101.3758), new Google.map.LatLng(3.031867, 101.3753), new G
未定义的
var polyline = [
new Google.map.LatLng(3.032617, 101.376),
new Google.map.LatLng(3.03255, 101.3759),
new Google.map.LatLng(3.032467, 101.3758),
new Google.map.LatLng(3.031867, 101.3753),
new Google.map.LatLng(3.0318, 101.3753)
];
var polylineopts = {
path: polyline,
map: map,
strokecolor: 'blue',
strokeopacity: 1.6,
strokeweight: 3,
geodesic: true
};
var poly = new google.maps.Polyline(polylineopts);
我想错误是“Google”未定义。Javascript区分大小写
应该是:
var polyline = [
new google.maps.LatLng(3.032617, 101.376),
new google.maps.LatLng(3.03255, 101.3759),
new google.maps.LatLng(3.032467, 101.3758),
new google.maps.LatLng(3.031867, 101.3753),
new google.maps.LatLng(3.0318, 101.3753)
];
var polylineopts = {
path: polyline,
map: map,
strokecolor: 'blue',
strokeopacity: 1.6,
strokeweight: 3,
geodesic: true
};
var poly = new google.maps.Polyline(polylineopts);
是否在头部包含google map js,即
此代码中没有任何理由说明google
不会未定义。为什么你认为不应该呢?你是想使用var poly=new Google.maps.Polyline(polylineopts)代码>(大写)?@user2314808清楚地解释您的问题。请输入有关您的问题的更多信息。Google.map!=谷歌地图