-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Add marker API #481
Add marker API #481
Conversation
mravn-google
commented
Apr 9, 2018
- Add marker API
- Simplified example pages
- Consolidated some Java code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -182,6 +198,10 @@ private static LatLngBounds toLatLngBounds(Object o) { | |||
return new LatLngBounds(toLatLng(data.get(0)), toLatLng(data.get(1))); | |||
} | |||
|
|||
private static boolean toBoolean(Object o) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neccesary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made use of toXxx(...)
consistent across all types.
|
||
void removeMarker(String markerId) { | ||
final Marker marker = marker(markerId); | ||
marker.remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you also want to remove from markers
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch. Done.
return new BitmapDescriptor._(<dynamic>['defaultMarker', hue]); | ||
} | ||
|
||
static BitmapDescriptor fromAsset(String assetName, [String package]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make package a named argument to align with AssetImage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
part of google_mobile_maps; | ||
|
||
class BitmapDescriptor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps worthy of a short dart-doc as the name is very generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review!
@@ -182,6 +198,10 @@ private static LatLngBounds toLatLngBounds(Object o) { | |||
return new LatLngBounds(toLatLng(data.get(0)), toLatLng(data.get(1))); | |||
} | |||
|
|||
private static boolean toBoolean(Object o) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made use of toXxx(...)
consistent across all types.
|
||
void removeMarker(String markerId) { | ||
final Marker marker = marker(markerId); | ||
marker.remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch. Done.
|
||
part of google_mobile_maps; | ||
|
||
class BitmapDescriptor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
return new BitmapDescriptor._(<dynamic>['defaultMarker', hue]); | ||
} | ||
|
||
static BitmapDescriptor fromAsset(String assetName, [String package]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.