-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[google_maps_flutter] Add pointForMeters to plugin in iOS #2503
Conversation
|
@cyanglaz drawing dotted polylines in iOS makes use of this api since SDK doesn't support it out of the box. I can't find android equivalent for the same as the map sdk for android doesn't seem to expose this method. What should be done in this case ? |
cyanglaz
left a comment
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 PR. I left some comments.
Is there a way to add Android implementation?
packages/google_maps_flutter/example/test_driver/google_maps_e2e.dart
Outdated
Show resolved
Hide resolved
ditman
left a comment
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.
Hello there! Thank you very much for the PR!
We're about to merge a change to google_maps_flutter, so it follows the "federated implementation" style. This will allow new platforms (like web) to be supported.
Once that change lands, some of the code that you've created/touched should live in the google_maps_flutter_platform_interface package, and not here.
Check out this PR on how we migrated the whole plugin to the new architecture. It should give you clues on how to modify your code to conform to it.
Feel free to reach out to me if you need any assistance with this!
|
The refactor has landed. |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
@googlebot I fixed it. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
@ditman @cyanglaz , I am integrating Federated plugin implementations changes to my open PR , and is facing some issues. Help resolving this is much appreciated. I've added an api to the google_maps_flutter_platform_interface and bumped the version number according to sem versioning. But since this is not hosted anywhere I am getting this issue. To solve this issue, I have to use relative path in my local project, rather than hosted one. But doing so will make my changes unpublishable in github tests. and if I stick with the google_maps_flutter_platform_interface ^1.0.1, the new changes are not available for the CI and tests would fail. Now, the tests are failing due to this. How should I solve this problem ? |
|
@aswinkviswanath you're correct. In order for you to push this change, you'll need to first get the changes in the platform_interface package reviewed and published, then the changes in the core plugin. This requires two separate PRs. It is normal to have a version of the core plugin that depends on the platform_interface via path, that is unpublishable until the platform_interface lands. Let me know if you have more questions, and thanks for adopting the new style so quickly! |
Make this depend on the version "from path" to check if all tests pass. This should make everything green except the "publishable" check.
|
I've introduced a change to this PR that should be reverted once the platform interface changes land, and are published to pub.dev. This is to make sure that all tests pass (except the "publishable" one, of course) |
|
(It seems there's ~38 tests broken in Android, can you take a look at those @aswinkviswanath?) Some traces (don't look very useful): PS: Does your master branch contain all the changes in |
|
@ditman We could use the logic used in the driver test to verify getPointsForMeters to make an implementation for andriod, but I am not sure how accurate that is / if its the way to go. and master branch contains all the changes in |
|
@aswinkviswanath this is the list of failing tests in Android: I'd understand BTW, can you make |
|
See an example of a skipped test. |
|
@ditman skipped testGetPointsForMeters in non iOS platforms, and the integration tests seems to pass now. |
Yes, this is great, thanks for taking care of this @aswinkviswanath!! |
|
Can we make this API available for android as well? |
Description
This PR will implement the pointForMeters projection api method in the plugin for iOS. This method helps you get the distance in meters to content size from the specified LatLng in the map.
iOS maps sdk doesn't support drawing dotted polylines out of the box. Instead we make use of drawing circles between two LatLngs. We have to make use of pointForMeters api method to draw circles without specifying a constant radius so that the circle scales regardless of zoom.
Related Issues
flutter/flutter#37959
#2108
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?