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;
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-06-13。"],[[["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"]]