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:
Gaya Visual Peta Berbasis Cloud/Penyesuaian Maps
Penyesuaian polyline: polyline berstempel
Gaya Visual Peta Berbasis Cloud/Penyesuaian Maps (beta)
Sekarang Anda dapat membuat gaya kustom, dan menggunakan token untuk menetapkannya ke peta di aplikasi dan situs Anda. Untuk informasi selengkapnya, lihat
Ringkasan Penyesuaian Maps iOS.
Penyesuaian polyline: polyline berstempel
Anda dapat menetapkan tampilan polyline ke tekstur bitmap berulang menggunakan GMSTextureStyle.
Gambar akan menutupi garis sepenuhnya, tetapi akan terpotong di sekitar titik akhir dan vertex.
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-06-13 UTC."],[[["The Beta version of the Maps SDK for iOS is being deprecated and will be decommissioned; features accessed through it will be supported in a future SDK version."],["This Beta release (v3.10.0) introduces Cloud-Based Map Styling for customizing maps in apps and websites."],["This release also includes Polyline Customization, allowing developers to apply repeating bitmap textures to polylines using `GMSTextureStyle`."]]],["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"]]