Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.0

* Support projection method pointForMeters, to get the distance in meters to content size from the specified LatLng in the map for iOS.

## 1.0.2

* Update lower bound of dart dependency to 2.1.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,14 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform {
return channel(mapId).invokeMethod<double>('map#getZoomLevel');
}

/// Converts a distance in meters to content size.
Future<double> getPointsForMeters(double meters, LatLng latLng,
{@required int mapId}) {
assert(meters != null && latLng != null);
return channel(mapId).invokeMethod<double>('projection#getPointsForMeters',
<String, dynamic>{"meter": meters, "location": latLng.toJson()});
}

/// Returns the image bytes of the map
@override
Future<Uint8List> takeSnapshot({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface {
throw UnimplementedError('getZoomLevel() has not been implemented.');
}

/// Converts a distance in meters to content size.
Future<double> getPointsForMeters(double meters, LatLng latLng,
{@required int mapId}) {
throw UnimplementedError('getPointsForMeters() has not been implemented.');
}

/// Returns the image bytes of the map
Future<Uint8List> takeSnapshot({
@required int mapId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the google_maps_flutter plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 1.0.2
version: 1.1.0

dependencies:
flutter:
Expand Down