새로운 지도 스타일이 곧 Google Maps Platform에 제공될 예정입니다. 이 지도 스타일 지정 업데이트에는 새로운 기본 색상 팔레트와 지도 환경 및 사용성 개선사항이 포함됩니다. 모든 지도 스타일이 2025년 3월에 자동으로 업데이트됩니다. 사용 가능 여부 및 더 일찍 선택하는 방법에 대한 자세한 내용은 Google Maps Platform용 새로운 지도 스타일을 참고하세요.
지도에 GeoJSON 데이터를 렌더링하려면 다음을 사용하여 GMUGeoJSONParser을 만듭니다.
GeoJSON 리소스 (이 경우 GeoJSON_sample.kml)의 경로
예) 그런 다음 GMUGeometryRenderer를 만들어
GMUKMLParser 인스턴스. 마지막으로,
GMUGeometryRenderer.render() 다음 코드 예에서는
지도에 GeoJSON 데이터 렌더링:
Swift
import GoogleMapsUtils
class GeoJSON {
private var mapView: GMSMapView!
func renderGeoJSON() {
guard let path = Bundle.main.path(forResource: "GeoJSON_sample", ofType: "json") else {
return
}
let url = URL(fileURLWithPath: path)
let geoJsonParser = GMUGeoJSONParser(url: url)
geoJsonParser.parse()
let renderer = GMUGeometryRenderer(map: mapView, geometries: geoJsonParser.features)
renderer.render()
}
}
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-09-05(UTC)"],[[["This page demonstrates how to render geographic data in GeoJSON format on Google Maps using the `GMUGeoJSONParser` and `GMUGeometryRenderer`."],["GeoJSON is a commonly used format for displaying geographic data like points, lines, and polygons."],["You'll need to set up the Maps SDK for iOS Utility Library before using `GMUGeoJSONParser`."],["The provided code examples show how to render GeoJSON data on a map in both Swift and Objective-C."]]],["The document explains how to render GeoJSON data on a map using the `GMUGeoJSONParser` and `GMUGeometryRenderer` from the Maps SDK for iOS Utility Library. First, a `GMUGeoJSONParser` is created with the GeoJSON resource path. Then, a `GMUGeometryRenderer` is initialized with the map view and the parser's features. Finally, the `GMUGeometryRenderer.render()` method is called to display the GeoJSON data, such as points, lines, and polygons, on the map.\n"]]