Halaman ini menunjukkan cara merender data geografis dalam KML
format, menggunakan GMUKMLParser dalam
bersama dengan GMUGeometryRenderer. KML adalah perangkat
format untuk merender data geografis seperti titik, garis, dan poligon.
Screenshot berikut menampilkan beberapa contoh data KML yang dirender pada peta:
Untuk contoh kode lengkap, lihat aplikasi contoh
aktif
GitHub.
Merender data KML
Untuk merender data KML pada peta, buat GMUKMLParser dengan elemen
ke resource KML (dalam contoh ini KML_Sample.kml). Lalu:
buat GMUGeometryRenderer dengan meneruskan GMUKMLParser
di instance Compute Engine. Terakhir, panggil GMUGeometryRenderer.render(). Tujuan
contoh kode berikut menunjukkan rendering data KML pada peta:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003eThis documentation explains how to render geographic data in KML format using the \u003ccode\u003eGMUKMLParser\u003c/code\u003e and \u003ccode\u003eGMUGeometryRenderer\u003c/code\u003e within the Google Maps SDK for iOS Utility Library.\u003c/p\u003e\n"],["\u003cp\u003eKML is a popular format used for displaying geographic data, including points, lines, and polygons, on maps.\u003c/p\u003e\n"],["\u003cp\u003eTo render KML data, create a \u003ccode\u003eGMUKMLParser\u003c/code\u003e instance with the path to your KML file, then use it to initialize a \u003ccode\u003eGMUGeometryRenderer\u003c/code\u003e, and finally, call \u003ccode\u003erender()\u003c/code\u003e on the renderer to display the data on your map.\u003c/p\u003e\n"],["\u003cp\u003eCode examples in both Swift and Objective-C are provided to demonstrate the process of rendering KML data on a map using the Google Maps SDK for iOS.\u003c/p\u003e\n"]]],[],null,[]]