GoogleMaps3D Framework Reference

Polyline

  @MainActor 
 @preconcurrency 
 struct 
 Polyline 
 
  extension 
 Polyline 
 : 
 MapContent 
 , 
  MapContentTappable 
 
 , 
 Sendable 
 , 
 SendableMetatype 
 , 
 View 
 

A 3D polyline that can be placed on a map.

  Map 
 ( 
 mode 
 : 
 . 
 hybrid 
 ) 
 { 
 Polyline 
 ( 
 path 
 : 
 [ 
 . 
 init 
 ( 
 latitude 
 : 
 37.7749 
 , 
 longitude 
 : 
 - 
 122.4194 
 , 
 altitude 
 : 
 100 
 ), 
 . 
 init 
 ( 
 latitude 
 : 
 37.7750 
 , 
 longitude 
 : 
 - 
 122.4193 
 , 
 altitude 
 : 
 100 
 ), 
 . 
 init 
 ( 
 latitude 
 : 
 37.7751 
 , 
 longitude 
 : 
 - 
 122.4192 
 , 
 altitude 
 : 
 100 
 ), 
 ]) 
 } 
 
  • The type of view representing the body of this view.

    When you create a custom view, Swift infers this type from your implementation of the required View/body-swift.property property.

    Declaration

    Swift

      typealias 
     Body 
     = 
     some 
     View 
     
    
  • Declaration

    Swift

      struct 
     ContourStyle 
     
    
      extension 
      Polyline 
     
     . 
     ContourStyle 
     : 
     Equatable 
     , 
     Hashable 
     
    
  • Declaration

    Swift

      struct 
     StrokeStyle 
     
    
      extension 
      Polyline 
     
     . 
     StrokeStyle 
     : 
     Equatable 
     , 
     Hashable 
     
    
  • Specifies how altitudes in the path are interpreted. Default value: clampToGround.

    Declaration

    Swift

      @MainActor 
     @preconcurrency 
     var 
     altitudeMode 
     : 
      AltitudeMode 
     
     
    
  • The content and behavior of the view.

    When you implement a custom view, you must implement a computed body property to provide the content for your view. Return a view that’s composed of built-in views that SwiftUI provides, plus other composite views that you’ve already defined:

      struct 
     MyView 
     : 
     View 
     { 
     var 
     body 
     : 
     some 
     View 
     { 
     Text 
     ( 
     "Hello, World!" 
     ) 
     } 
     } 
     
    

    For more information about composing views and a view hierarchy, see doc:Declaring-a-Custom-View .

    Declaration

    Swift

      @MainActor 
     @preconcurrency 
     var 
     body 
     : 
     some 
     View 
     { 
     get 
     } 
     
    
  • Declaration

    Swift

      @MainActor 
     @preconcurrency 
     func 
     contour 
     ( 
     _ 
     style 
     : 
     Polyline 
     . 
      ContourStyle 
     
     ) 
     -> 
     Polyline 
     
    
  • Values that define how polylines are drawn to represent the contour of the Earth.

    Declaration

    Swift

      @MainActor 
     @preconcurrency 
     var 
     contourStyle 
     : 
     Polyline 
     . 
      ContourStyle 
     
     
    
  • Declaration

    Swift

      @MainActor 
     @preconcurrency 
     init 
     ( 
     path 
     : 
     [ 
      LatLngAltitude 
     
     ], 
     altitudeMode 
     : 
      AltitudeMode 
     
     = 
     . 
     clampToGround 
     , 
     zIndex 
     : 
     Int32 
     = 
     0 
     ) 
     
    
  • Sets the path of the polyline in LatLngAltitude coordinates.

    Declaration

    Swift

      @MainActor 
     @preconcurrency 
     var 
     path 
     : 
     [ 
      LatLngAltitude 
     
     ] 
     
    
  • Declaration

    Swift

      @MainActor 
     @preconcurrency 
     func 
     stroke 
     ( 
     _ 
     style 
     : 
     Polyline 
     . 
      StrokeStyle 
     
     ) 
     -> 
     Polyline 
     
    
  • Stroke style of the polyline.

    Declaration

    Swift

      @MainActor 
     @preconcurrency 
     var 
     strokeStyle 
     : 
     Polyline 
     . 
      StrokeStyle 
     
     
    
  • The draw order compared to other polys. Default value: 0.

    Declaration

    Swift

      @MainActor 
     @preconcurrency 
     var 
     zIndex 
     : 
     Int32 
     
    
Create a Mobile Website
View Site in Mobile | Classic
Share by: