Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerttu committed Jan 14, 2025
1 parent fa524df commit b2d9649
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class GroundOverlayBodyState extends State<GroundOverlayBody> {
// Index to be used as identifier for the ground overlay.
// If position is changed to bounds and vice versa, the ground overlay will
// be removed and added again with the new type. Also anchor can be given only
// when the ground overlay is created with position and cannot be change after
// the ground overlay is created.
// when the ground overlay is created with position and cannot be changed
// after the ground overlay is created.
int _groundOverlayIndex = 0;

@override
Expand All @@ -78,11 +78,6 @@ class GroundOverlayBodyState extends State<GroundOverlayBody> {
this.controller = controller;
}

@override
void dispose() {
super.dispose();
}

void _removeGroundOverlay() {
setState(() {
_groundOverlay = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ static Tile tileFromPigeon(Messages.PlatformTile tile) {
* @param groundOverlay the object expected to be a PlatformGroundOverlay containing the ground
* overlay options.
* @param sink the GroundOverlaySink where the options will be set.
* @param assetManager An instance of Android's AssetManager, which provides access
* to any raw asset files stored in the application's assets directory.
* @param assetManager An instance of Android's AssetManager, which provides access to any raw
* asset files stored in the application's assets directory.
* @param density the density of the display, used to calculate pixel dimensions.
* @param wrapper the BitmapDescriptorFactoryWrapper to create BitmapDescriptor.
* @return the identifier of the ground overlay.
Expand Down Expand Up @@ -962,11 +962,11 @@ static String interpretGroundOverlayOptions(
LatLng position = groundOverlay.getPosition();
LatLngBounds bounds = groundOverlay.getBounds();

// Calculate normalized latitude
// Calculate normalized latitude.
double height = bounds.northeast.latitude - bounds.southwest.latitude;
double normalizedLatitude = 1.0 - ((position.latitude - bounds.southwest.latitude) / height);

// Calculate normalized longitude
// Calculate normalized longitude.
double west = bounds.southwest.longitude;
double east = bounds.northeast.longitude;
double longitudeOffset = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class GroundOverlayBodyState extends State<GroundOverlayBody> {
// Index to be used as identifier for the ground overlay.
// If position is changed to bounds and vice versa, the ground overlay will
// be removed and added again with the new type. Also anchor can be given only
// when the ground overlay is created with position and cannot be change after
// the ground overlay is created.
// when the ground overlay is created with position and cannot be changed
// after the ground overlay is created.
int _groundOverlayIndex = 0;

@override
Expand All @@ -78,11 +78,6 @@ class GroundOverlayBodyState extends State<GroundOverlayBody> {
this.controller = controller;
}

@override
void dispose() {
super.dispose();
}

void _removeGroundOverlay() {
setState(() {
_groundOverlay = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class GroundOverlayBodyState extends State<GroundOverlayBody> {
// Index to be used as identifier for the ground overlay.
// If position is changed to bounds and vice versa, the ground overlay will
// be removed and added again with the new type. Also anchor can be given only
// when the ground overlay is created with position and cannot be change after
// the ground overlay is created.
// when the ground overlay is created with position and cannot be changed
// after the ground overlay is created.
int _groundOverlayIndex = 0;

@override
Expand All @@ -78,11 +78,6 @@ class GroundOverlayBodyState extends State<GroundOverlayBody> {
this.controller = controller;
}

@override
void dispose() {
super.dispose();
}

void _removeGroundOverlay() {
setState(() {
_groundOverlay = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,19 @@ class GroundOverlay implements MapsObject<GroundOverlay> {
/// The default bearing is 0, i.e., the image is aligned so that up is north.
final double bearing;

/// The transparency of the ground overlay. The default transparency is 0 (opaque).
/// The transparency of the ground overlay. The default is 0 (opaque).
final double transparency;

/// The tile overlay's zIndex, i.e., the order in which it will be drawn where
/// overlays with larger values are drawn above those with lower values
/// The default visibility is 0.0.
/// overlays with larger values are drawn above those with lower values.
/// The default is 0.0.
final double zIndex;

/// The visibility for the tile overlay. The default visibility is true.
/// The visibility for the tile overlay. The default is true.
final bool visible;

/// Controls if click events are handled for this ground overlay.
/// The default visibility is true.
/// The default is true.
final bool clickable;

/// Callbacks to receive tap events for ground overlay placed on this map.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class TileOverlay implements MapsObject<TileOverlay> {
final double transparency;

/// The tile overlay's zIndex, i.e., the order in which it will be drawn where
/// overlays with larger values are drawn above those with lower values
/// overlays with larger values are drawn above those with lower values.
final int zIndex;

/// The visibility for the tile overlay. The default visibility is true.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class GroundOverlaysController extends GeometryController {
final Map<GroundOverlayId, GroundOverlayController>
_groundOverlayIdToController;

// The stream over which polylines broadcast their events
// The stream over which ground overlays broadcast their events
final StreamController<MapEvent<Object?>> _streamController;

/// Adds new [GroundOverlay]s to this controller.
Expand Down Expand Up @@ -98,8 +98,8 @@ class GroundOverlaysController extends GeometryController {
_streamController.add(GroundOverlayTapEvent(mapId, groundOverlayId));
}

/// Returns the [GroundOverlay] with the given [GroundOverlayId] for testing
/// purposes.
/// Returns the [GroundOverlay] with the given [GroundOverlayId].
/// Only used for testing.
gmaps.GroundOverlay? getGroundOverlay(GroundOverlayId groundOverlayId) {
final GroundOverlayController? controller =
_groundOverlayIdToController.remove(groundOverlayId);
Expand Down

0 comments on commit b2d9649

Please sign in to comment.