SDK Bản đồ dành cho iOS phiên bản 3.10.0 Beta
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
SDK bản đồ dành cho iOS phiên bản 3.10.0 Beta ra mắt các tính năng mới sau đây để bạn dùng thử:
Tuỳ chỉnh bản đồ bằng tính năng Định kiểu bản đồ dựa trên đám mây
Tuỳ chỉnh hình nhiều đường: hình nhiều đường được đóng dấu
Tuỳ chỉnh bản đồ bằng tính năng Định kiểu bản đồ dựa trên đám mây (thử nghiệm)
Giờ đây, bạn có thể tạo kiểu tuỳ chỉnh và sử dụng mã thông báo để chỉ định kiểu đó cho bản đồ trong
ứng dụng và trang web của mình. Để biết thêm thông tin, hãy xem phần
Tổng quan về tính năng tuỳ chỉnh bản đồ iOS.
Tuỳ chỉnh hình nhiều đường: hình nhiều đường được đóng dấu
Bạn có thể đặt giao diện của hình nhiều đường thành kết cấu bitmap lặp lại bằng cách sử dụng GMSTextureStyle. Hình ảnh bao phủ hoàn toàn đường kẻ, nhưng bị cắt bớt xung quanh các điểm cuối và đỉnh.
Để tạo một hình nhiều đường có đóng dấu, hãy tạo một GMSStampStyle của GMSTextureStyle.
Sau đó, hãy đặt thuộc tính này trên đối tượng tuỳ chọn của hình dạng bằng cách sử dụng stampStyle, như minh hoạ dưới đây:
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;
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2026-11-05 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"]]