0
는 어떻게 프로그래밍 방식으로 자바 스크립트 그들은 내가 작은 지리 클릭이 그림에서중복 기능을 위해 구글은
겹치는 경우 다른 사람의 상단에있는 기능 정의 않는위한 그러나 정보를 매핑 외부 지리학 적 특징이 나타났다. 프로그래밍 방식으로 작은 기능을 맨 위에 배치하고 싶습니다. 여기
는 javascript- 나는 geojson 파일 자체의 기능의 순서를 반전하고이 동작을 변경하지 않았다map.data.loadGeoJson('<path to my geojson definition>');
map.data.setStyle(function (feature) {
let color = 'gray';
console.log(feature);
if (feature.getProperty('isColorful')) {
color = 'blue';
}
return ({
fillColor: color,
strokeColor: color,
strokeWeight: 1
});
});
map.data.addListener('click', function (event) {
let name = event.feature.getProperty('name');
let contentString = '<h4>Polygon Info</h4><br>';
contentString += '<p>';
if (name) {
contentString += '<b>Name:</b>' + name + '<br>';
}
contentString += '</p>';
let infowindow = new google.maps.InfoWindow({
content: contentString,
position: event.latLng
});
infowindow.open(map);
event.feature.setProperty('isColorful', true);
});
주에서지도를 채울 수있는 내 코드입니다.