GoogleMaps Framework Reference

GMSGroundOverlay

  @interface 
 GMSGroundOverlay 
 : 
  GMSOverlay 
 
 

GMSGroundOverlay specifies the available options for a ground overlay that exists on the Earth’s surface. Unlike a marker, the position of a ground overlay is specified explicitly and it does not face the camera.

  • The position of this GMSGroundOverlay , or more specifically, the physical position of its anchor. If this is changed, bounds will be moved around the new position.

    Declaration

    Swift

      var 
     position 
     : 
     CLLocationCoordinate2D 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     CLLocationCoordinate2D 
     position 
     ; 
     
    
  • The anchor specifies where this GMSGroundOverlay is anchored to the Earth in relation to bounds . If this is modified, position will be set to the corresponding new position within bounds .

    Declaration

    Swift

      var 
     anchor 
     : 
     CGPoint 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     CGPoint 
     anchor 
     ; 
     
    
  • Icon to render within bounds on the Earth. If this is nil, the overlay will not be visible (unlike GMSMarker which has a default image).

    Declaration

    Swift

      var 
     icon 
     : 
     UIImage 
     ? 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     nullable 
     ) 
     UIImage 
     * 
     icon 
     ; 
     
    
  • Sets the opacity of the ground overlay, between 0 (completely transparent) and 1 (default) inclusive.

    Declaration

    Swift

      var 
     opacity 
     : 
     Float 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     float 
     opacity 
     ; 
     
    
  • Bearing of this ground overlay, in degrees. The default value, zero, points this ground overlay up/down along the normal Y axis of the earth.

    Declaration

    Swift

      var 
     bearing 
     : 
     CLLocationDirection 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     CLLocationDirection 
     bearing 
     ; 
     
    
  • The 2D bounds on the Earth in which icon is drawn. Changing this value will adjust position accordingly.

    Declaration

    Swift

      var 
     bounds 
     : 
      GMSCoordinateBounds 
     
     ? 
     { 
     get 
     set 
     } 
     
    

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     nullable 
     ) 
      GMSCoordinateBounds 
     
     * 
     bounds 
     ; 
     
    
  • Convenience constructor for GMSGroundOverlay for a particular bounds and icon . Will set position accordingly.

    Declaration

    Swift

      convenience 
     init 
     ( 
     bounds 
     : 
      GMSCoordinateBounds 
     
     ?, 
     icon 
     : 
     UIImage 
     ?) 
     
    

    Objective-C

      + 
     ( 
     nonnull 
     instancetype 
     ) 
     groundOverlayWithBounds 
     : 
     ( 
     nullable 
      GMSCoordinateBounds 
     
     * 
     ) 
     bounds 
     icon 
     :( 
     nullable 
     UIImage 
     * 
     ) 
     icon 
     ; 
     
    
  • Constructs a GMSGroundOverlay that renders the given icon at position , as if the image’s actual size matches camera pixels at zoomLevel .

    Declaration

    Swift

      convenience 
     init 
     ( 
     position 
     : 
     CLLocationCoordinate2D 
     , 
     icon 
     : 
     UIImage 
     ?, 
     zoomLevel 
     : 
     CGFloat 
     ) 
     
    

    Objective-C

      + 
     ( 
     nonnull 
     instancetype 
     ) 
     groundOverlayWithPosition 
     : 
     ( 
     CLLocationCoordinate2D 
     ) 
     position 
     icon 
     :( 
     nullable 
     UIImage 
     * 
     ) 
     icon 
     zoomLevel 
     :( 
     CGFloat 
     ) 
     zoomLevel 
     ; 
     
    
Create a Mobile Website
View Site in Mobile | Classic
Share by: