This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[google_maps_flutter(_platform_interface)] Make the plugin friendlier to the web implementation. #2903
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…o we can use cache effectively in web.
* Pass icon width/height if present on `fromAssetImage` BitmapDescriptors (web only) * Bump version
cyanglaz
reviewed
Aug 1, 2020
packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart
Outdated
Show resolved
Hide resolved
… of init param more obvious.
@cyanglaz and I discussed some changes in the chat, concerns about the creation map ID being a random number, and having a not very clear parameter name. I've updated the creation map ID to being an auto-incrementing int, and moving the creation parameter name to something more verbose/self explanatory. |
cyanglaz
approved these changes
Aug 4, 2020
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 % tests and nits.
packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart
Outdated
Show resolved
Hide resolved
jarrodcolburn
pushed a commit
to jarrodcolburn/plugins
that referenced
this pull request
Aug 20, 2020
…n. (flutter#2903) This change tweaks slightly the core maps plugin and the platform interface package to make the web implementation possible. The most important changes are two: * The core plugin now passes a constant identifier to the buildView platform call, so the web version can cache effectively the contents of the platform view, so it doesn't repaint. This might go away once Scenelets for web come online. * The platform interface now encodes the (optional) width and height of custom Icons for Markers, so the web can render High DPI assets at the correct size. The rest are some examples to the 'example' app so it can be run on web.
jorgefspereira
pushed a commit
to jorgefspereira/plugins_flutter
that referenced
this pull request
Oct 10, 2020
…n. (flutter#2903) This change tweaks slightly the core maps plugin and the platform interface package to make the web implementation possible. The most important changes are two: * The core plugin now passes a constant identifier to the buildView platform call, so the web version can cache effectively the contents of the platform view, so it doesn't repaint. This might go away once Scenelets for web come online. * The platform interface now encodes the (optional) width and height of custom Icons for Markers, so the web can render High DPI assets at the correct size. The rest are some examples to the 'example' app so it can be run on web.
FlutterSu
pushed a commit
to FlutterSu/flutter-plugins
that referenced
this pull request
Nov 20, 2020
…n. (flutter#2903) This change tweaks slightly the core maps plugin and the platform interface package to make the web implementation possible. The most important changes are two: * The core plugin now passes a constant identifier to the buildView platform call, so the web version can cache effectively the contents of the platform view, so it doesn't repaint. This might go away once Scenelets for web come online. * The platform interface now encodes the (optional) width and height of custom Icons for Markers, so the web can render High DPI assets at the correct size. The rest are some examples to the 'example' app so it can be run on web.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds some small modifications to the core maps plugin and its platform interface, so the web version is doable.
It allows people using the experimental branch of google_maps_flutter_web to keep using it, without having to override many packages (and will also simplify the final merge of google_maps_flutter_web, so it only touches one package!)
This PR touches two packages, but both changes should be independent, and backwards compatible, so test should pass, and they can be merged and published in any order.
google_maps_flutter
creationMapId
toplatform.buildView
, so web can return a cached widget DOM when flutter attempts to repaint there.google_maps_flutter_platform_interface
fromAssetImage
BitmapDescriptors (web only, because web can't determine the actual size of an asset at run-time as easily as the native side).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?