Skip to content

Draggable annotations - #753

Merged
LukasPaczos merged 1 commit into
masterfrom
lp-703-draggable-annotations
Nov 9, 2018
Merged

LukasPaczos merged 1 commit into
masterfrom
lp-703-draggable-annotations

Conversation

@LukasPaczos

@LukasPaczos LukasPaczos commented Nov 5, 2018 •

Copy link
Copy Markdown
Contributor

Closes #703.

ezgif com-video-to-gif 14

@LukasPaczos LukasPaczos added this to the annotation-0.3.0 milestone Nov 5, 2018
@LukasPaczos
LukasPaczos force-pushed the lp-703-draggable-annotations branch 5 times, most recently from 04bfc22 to 25d4b1c Compare November 6, 2018 16:07
@LukasPaczos
LukasPaczos requested a review from tobrun November 6, 2018 16:10
@LukasPaczos

Copy link
Copy Markdown
Contributor Author

This one is ready for a review.

ezgif com-video-to-gif 15

@LukasPaczos
LukasPaczos force-pushed the lp-703-draggable-annotations branch from 25d4b1c to 7ebd641 Compare November 9, 2018 12:02

@tobrun tobrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

*/
@NonNull
public LatLng getLatLng() {
Point point = (Point) geometry;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, but something that comes to mind now, do we need type geometry with generics? (avoids casting in this case).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can possibly do it to clean up those casts 👍

return Polygon.fromLngLats(resultingPoints);
}

return null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want nullability for this? Returning an empty list would suffice and would make the method @NonNull

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, we are returning null to indicate that the resulting geometry is invalid and we should not set it, leaving the old one being displayed

@LukasPaczos
LukasPaczos force-pushed the lp-703-draggable-annotations branch from 7ebd641 to adac5b1 Compare November 9, 2018 12:48
@LukasPaczos
LukasPaczos merged commit 50c389d into master Nov 9, 2018
@LukasPaczos
LukasPaczos deleted the lp-703-draggable-annotations branch November 9, 2018 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants