Bergabunglah bersama kami di Google Maps Platform Developer Community Day berikutnya di San Francisco pada bulan Desember. Daftar sekarang untuk hadir.
Google menggunakan teknologi AI untuk menerjemahkan konten ke dalam bahasa pilihan Anda. Terjemahan AI mungkin mengandung kesalahan.
Halaman ini menunjukkan cara merender data geografis di GeoJSON
format, menggunakan GMUGeoJSONParser, dalam
bersama dengan GMUGeometryRenderer. GeoJSON adalah metode populer
format untuk merender data geografis seperti titik, garis, dan poligon.
Untuk contoh kode lengkap, lihat aplikasi contoh
aktif
GitHub.
Merender data GeoJSON
Untuk merender data GeoJSON pada peta, buat GMUGeoJSONParser dengan
jalur ke resource GeoJSON (GeoJSON_sample.kml dalam
contoh). Lalu, buat GMUGeometryRenderer, dengan meneruskan
Instance GMUKMLParser. Terakhir, panggil
GMUGeometryRenderer.render(). Contoh kode berikut menunjukkan
merender data GeoJSON 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 2026-09-19 UTC."],[],["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"]]