나는 배열이 : 나는 2D 구글지도에 마커를 배치해야액세스 자바 스크립트 배열
var = CITIES {
"Buenos Aires":
{latitude: -34.6084, longitude: -58.3732},
"Santiago":
{latitude: -33.4254, longitude: -70.5665},
"Gaborone":
{latitude: -24.6541, longitude: 25.9087},
...
};
을; JS 콘솔은 그 말을 나에게 오류를주고있다
/*
* void
* mark()
*
* Markes locations of study abroad programs all around the world map
*/
function mark()
{
// mark programs
for (var city in CITIES)
{
// plant cities on map
new google.maps.Marker({
icon: "http://google-maps-icons.googlecode.com/files/smallcity.png",
map: map,
position: new google.maps.LatLng(CITIES[city].latitude, CITIES[city].longitude),
title: 'CITIES[city]'
});
}
}
: :이 기능을 수행하려고
missing variable name
[Break on this error] var = CITIES {\n
나는 오류가 날 도시 매개 변수와 함께 도시 접근과 관련이있다 알지만, 이 문제를 해결하고 필요한 정보에 액세스하려면 어떻게해야합니까?
그래서 오류가 사라진 것처럼 보입니다. 위치 표시를 표시하려면 어떻게해야합니까? –