Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Maps SDK for iOS v3.10.0 Beta memperkenalkan fitur baru berikut untuk Anda coba:
Penyesuaian peta Gaya Visual Peta Berbasis Cloud
Penyesuaian polyline: polyline berstempel
Penyesuaian peta Gaya Visual Peta Berbasis Cloud (beta)
Sekarang Anda dapat membuat gaya kustom, dan menggunakan token untuk menetapkannya ke peta di aplikasi dan situs Anda. Untuk mengetahui informasi selengkapnya, lihat
Ringkasan Penyesuaian Peta iOS.
Penyesuaian polyline: polyline berstempel
Anda dapat menetapkan tampilan polyline ke tekstur bitmap berulang menggunakan
GMSTextureStyle. Gambar menutupi garis sepenuhnya, tetapi terpotong di sekitar titik akhir dan titik sudut.
Untuk membuat polyline berstempel, buat GMSStampStyle dari GMSTextureStyle.
Kemudian, tetapkan properti ini pada objek opsi bentuk menggunakan stampStyle, seperti
yang ditunjukkan di sini:
Swift
letpath=GMSMutablePath()path.addLatitude(-37.81319,longitude:144.96298)path.addLatitude(-31.95285,longitude:115.85734)letpolyline=GMSPolyline(path:path)letredWithStamp=GMSStrokeStyle.solidColor(.red)letimage=UIImage(named:"imageFromBundleOrAsset")!// Image could be from anywhereredWithStamp.stampStyle=GMSTextureStyle(image:image)letspan=GMSStyleSpan(style:redWithStamp)polyline.spans=[span]polyline.map=mapView
Objective-C
GMSMutablePath*path=[GMSMutablePathpath];[pathaddLatitude:-37.81319longitude:144.96298];[pathaddLatitude:-31.95285longitude:115.85734];GMSPolyline*polyline=[GMSPolylinepolylineWithPath:path];GMSStrokeStyle*redWithStamp=[GMSStrokeStylesolidColor:[UIColorredColor]];UIImage*image=[UIImageimageNamed:@"imageFromBundleOrAsset"];// Image could be from anywhereredWithStamp.stampStyle=[GMSTextureStyletextureStyleWithImage:image];GMSStyleSpan*span=[GMSStyleSpanspanWithStyle:redWithStamp];polyline.spans=@[span];polyline.map=mapView;
[[["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-09-25 UTC."],[],["The Beta SDK is deprecated and unavailable for new use. The Maps SDK for iOS v3.10.0 Beta introduces cloud-based map styling, allowing custom style creation and token assignment. It also introduces stamped polyline customization. To create a stamped polyline, a `GMSStampStyle` of `GMSTextureStyle` must be created and applied to the shape's options using `stampStyle`. Code examples in Swift and Objective-C demonstrate setting a repeating bitmap texture on a polyline.\n"]]