GoogleMaps Framework Reference

  • GMSPolygonLayer is a subclass of GMSOverlayLayer used for animating properties of its associated GMSPolygon .

  • This layer isn't directly rendered, as GMSMapView utilizes an OpenGL layer for rendering.

  • Customizable properties include strokeWidth for outline width, strokeColor for outline color, and fillColor for the polygon's fill color.

  • strokeColor and fillColor are assign properties and the GMSPolygon is expected to manage their memory.

GMSPolygonLayer

  @interface 
 GMSPolygonLayer 
 : 
  GMSOverlayLayer 
 
 

GMSPolygonLayer is a subclass of GMSOverlayLayer , available on a per-polygon basis, that allows animation of several properties of its associated GMSPolygon .

Note that this CALayer is never actually rendered directly, as GMSMapView is provided entirely via an OpenGL layer. As such, adjustments or animations to ‘default’ properties of CALayer will not have any effect.

  • The width of the polygon outline in screen points.

    Declaration

    Swift

      var 
     strokeWidth 
     : 
     CGFloat 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     CGFloat 
     strokeWidth 
     ; 
     
    
  • The color of the polygon outline. This is an assign property, there is an expectation for the GMSPolygon to own the reference if necessary.

    Declaration

    Swift

      unowned(unsafe) 
     var 
     strokeColor 
     : 
     CGColor 
     ? 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     nullable 
     ) 
     CGColorRef 
     strokeColor 
     ; 
     
    
  • The fill color. This is an assign property, there is an expectation for the GMSPolygon to own the reference if necessary.

    Declaration

    Swift

      unowned(unsafe) 
     var 
     fillColor 
     : 
     CGColor 
     ? 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     nullable 
     ) 
     CGColorRef 
     fillColor 
     ; 
     
    
Design a Mobile Site
View Site in Mobile | Classic
Share by: