우편 번호를 통한 검색과 함께 여러지도 표시자를 표시하는 스크립트를 작성했거나 주소가 여러 표식과 사용자의 주어진 위치 사이의 거리를 표시하는 주소도 있지만 .. 일부 콘텐츠가있는 infoWindow를 표시하려고합니다. 내가 각 마커에 쓸 것입니다 ... 누구든지 나를 도울 수 있습니까 ??Google지도 Javascript Api. 지도 표시 자 infoWindow 표시
스크립트는 다음과 같이 진행됩니다
var features = [
{
position: new google.maps.LatLng(38.089374, 23.809245),
type: 'info'
}, {
position: new google.maps.LatLng(37.865212, 23.744748),
type: 'info'
}, {
position: new google.maps.LatLng(37.997172, 23.693429),
type: 'info'
}, {
position: new google.maps.LatLng(37.934769, 23.879542),
type: 'info'
}, {
position: new google.maps.LatLng(38.003720, 23.886767),
type: 'info'
}, {
position: new google.maps.LatLng(38.027083, 23.850951),
type: 'info'
}, {
position: new google.maps.LatLng(37.944077, 23.661457),
type: 'info'
}, {
position: new google.maps.LatLng(38.017348, 23.796585),
type: 'info'
}, {
position: new google.maps.LatLng(37.955754, 23.677229),
type: 'info'
}, {
position: new google.maps.LatLng(37.971261, 23.756350),
type: 'info'
}, {
position: new google.maps.LatLng(37.990022, 23.720621),
type: 'info'
}, {
position: new google.maps.LatLng(38.050031, 23.752440),
type: 'info'
}, {
position: new google.maps.LatLng(38.464754,23.615317),
type: 'info'
}, {
position: new google.maps.LatLng(37.943692, 23.748214),
type: 'info'
}, {
position: new google.maps.LatLng(39.544696, 21.775843),
type: 'info'
}, {
position: new google.maps.LatLng(40.668344, 22.889161),
type: 'info'
}, {
position: new google.maps.LatLng(40.662039, 22.911951),
type: 'info'
}, {
position: new google.maps.LatLng(40.573629, 23.025070),
type: 'info'
}, {
position: new google.maps.LatLng(40.303271, 21.804128),
type: 'info'
}
];
// edw oi kaloi oi markers.
features.forEach(function(feature) {
var marker = new google.maps.Marker({
position: feature.position,
icon: icons[feature.type].icon,
map: map
});
});
게시 된 코드에 [InfoWindows] (https://developers.google.com/maps/documentation/javascript/infowindows)가 없습니다. – geocodezip
예, InfoWindow를 삽입하려고했지만 아무리 제대로 작동하지 않아도됩니다. 볼 수 있듯이 var 기능은 내 마커이며 infowindow에 대한 코드 조각을 넣어도 표시되지 않거나 클릭 할 때 창을 볼 수 있지만 비어 있습니다 ... (작성하지 않은 경우 용서하십시오. 명확한 이유는 이것입니다.) – elusivesmoke
정보 창을 삽입하려고 할 때 코드가 어떻게 보이는지 보여 줄 수 있습니까? 그러면 우리가 뭘 잘못했는지 말할 수 있습니다. – Jacob