Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_maps_flutter_web] Render custom Marker icons. #3273

Merged
merged 7 commits into from
Nov 18, 2020

Conversation

ditman
Copy link
Member

@ditman ditman commented Nov 17, 2020

Description

This PR adds support for fromBytes BitmapDescriptors, so Markers can have programmatically-generated icons in web.

Screen Shot 2020-11-17 at 11 25 51 AM

This also fixes an issue where custom Marker icons were not being rendered as part of the "initial geometry" (there was a TODO/question about it). Now they should work as expected.

(Tangentially, this also enables defaultMarkerWithHue, which can be implemented by computing the bytes of the rotated hue of a default Marker image, similar to the code on this jsfiddle).

Related Issues

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@ditman ditman merged commit 869f211 into flutter:master Nov 18, 2020
@ditman ditman deleted the gmaps-custom-bitmaps branch November 18, 2020 19:42
@ditman
Copy link
Member Author

ditman commented Nov 18, 2020

This has been published. Please try: google_maps_flutter_web: ^0.1.0+8

amantoux pushed a commit to amantoux/plugins that referenced this pull request Feb 8, 2021
* Render markers fromBytes. Ensure initial icon is also preserved. Add test.
* Opt-out tests from null-safety until plugin is migrated.
adsonpleal pushed a commit to nubank/plugins that referenced this pull request Feb 26, 2021
* Render markers fromBytes. Ensure initial icon is also preserved. Add test.
* Opt-out tests from null-safety until plugin is migrated.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants