Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum 15 April 2025 harus memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengubah peta dasar Google Maps. Memungkinkan:
1) Menetapkan MapType saat ini. 2) Menyediakan gaya kustom untuk peta dasar (MapTypeStyles). 3) Menetapkan daftar available mapTypesIds untuk peta dasar.
Jika dipanggil tanpa parameter, akan mereset jenis peta ke default Google.
Menampilkan peta.
Penggunaan
Hasil
Map.setOptions(mapTypeId, styles, types)
ui.Map
Argumen
Jenis
Detail
mapTypeId
String, opsional
mapTypeId untuk menetapkan peta dasar. Dapat berupa "ROADMAP", "SATELLITE", "HYBRID", atau "TERRAIN" untuk memilih salah satu jenis peta Google Maps API standar, atau salah satu kunci yang ditentukan dalam kamus opt_styles. Jika dibiarkan sebagai null dan hanya 1 gaya yang ditentukan dalam opt_styles, gaya tersebut akan digunakan.
styles
Objek, opsional
Kamus objek MapTypeStyle kustom yang diberi kunci dengan nama yang akan muncul di Kontrol Jenis Peta. Lihat: https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyle
types
List<String>, opsional
Daftar mapTypeIds yang akan tersedia. Jika dihilangkan, tetapi opt_styles ditentukan, akan menambahkan semua kunci gaya ke jenis peta Google Maps API standar.
[[["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-25 UTC."],[[["Modifies the Google Maps basemap by setting the map type, providing custom styles, and controlling available map types."],["Accepts parameters to change the basemap's appearance or resets to the default Google Maps style when called without parameters."],["Offers flexibility in styling through custom MapTypeStyle objects and allows for selection from standard Google Maps API map types or custom styles."],["Uses the `setOptions()` method with arguments for mapTypeId, styles, and types to implement the modifications."],["Returns the ui.Map object after applying the specified options."]]],["This function, `Map.setOptions()`, modifies the Google Maps basemap. It can set the `mapTypeId` to \"ROADMAP,\" \"SATELLITE,\" \"HYBRID,\" or \"TERRAIN,\" or to a custom style from the `styles` dictionary. Custom styles (`styles`) are defined as `MapTypeStyle` objects. The available `mapTypeIds` displayed in the basemap can be defined in `types`. If called without arguments, the function reverts to the default Google map type. It returns the modified `ui.Map` object.\n"]]