SDK Maps pour iOS v3.10.0 bêta
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Le SDK Maps pour iOS v3.10.0 (bêta) introduit les nouvelles fonctionnalités suivantes que vous pouvez essayer :
Personnalisation des cartes avec les styles de cartes basés dans le cloud
Personnalisation des polylignes : polylignes avec motif
Personnalisation des cartes avec les styles de cartes basés dans le cloud (bêta)
Vous pouvez désormais créer des styles personnalisés et utiliser des jetons pour les attribuer à des cartes dans vos applications et sites Web. Pour en savoir plus, consultez
Présentation de la personnalisation des cartes iOS.
Personnalisation des polylignes : polylignes avec motif
Vous pouvez créer une polyligne recouverte d'une texture de bitmaps qui se répètent à l'aide de GMSTextureStyle. Les images couvrent complètement la ligne, mais sont coupées autour des points de terminaison et des sommets.
Pour créer une polyligne avec motif, créez un GMSStampStyle de GMSTextureStyle.
Définissez ensuite cette propriété sur l'objet d'options de la forme à l'aide de stampStyle, comme illustré ici :
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;
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2026/05/09 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2026/05/09 (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"]]