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

[google_maps_flutter_web] First version of the plugin. #2933

Merged
merged 58 commits into from
Aug 19, 2020

Conversation

ditman
Copy link
Member

@ditman ditman commented Aug 16, 2020

Description

This is the first version of the Google Maps plugin for web, started by @cylyl, and finished by myself.

There are some missing features that were Android only, but I think I documented most of them in the README of the plugin.

Testing

If you want to manually test this plugin, I've published the standard maps example app here:

There's a good amount of unit tests in this PR. They need chromedriver to run. See the README of the test directory on how to run them. Here's more information: An introduction to integration testing.

If anybody wants to test this branch into their App, use a Git dependency on the pubspec file, like so:

google_maps_flutter_web:
  git:
    url: https://github.com/ditman/plugins.git
    ref: gmaps-web
    path: packages/google_maps_flutter/google_maps_flutter_web

Then compile your app for the web. Get started here: Building a web application with Flutter.

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.

@ditman ditman requested a review from cyanglaz August 16, 2020 05:14
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@cylyl
Copy link
Contributor

cylyl commented Aug 16, 2020

@googlebot I consent.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@jfreeland
Copy link

jfreeland commented Aug 17, 2020

If anybody wants to test this branch into their App, use a Git dependency on the pubspec file, like so:

google_maps_for_web:

nit: I think should be google_maps_flutter_web for anyone reading and it's not obvious? Though I suppose you could make both work.

And is it strictly required that I be using your version of google_maps_flutter as well? I haven't read through the PR to see if there were any meaningful changes, but I have been using your repo more-or-less in this manner:

  google_maps_flutter:
    git:
      url: https://github.com/ditman/plugins.git
      ref: gmaps-web
      path: packages/google_maps_flutter/google_maps_flutter
  google_maps_flutter_web:
    git:
      url: https://github.com/ditman/plugins.git
      ref: gmaps-web
      path: packages/google_maps_flutter/google_maps_flutter_web

It seems like you have a strict dependency on google_maps_flutter from .., so perhaps my declaring this is redundant and not necessary.

@ditman
Copy link
Member Author

ditman commented Aug 17, 2020

@jfreeland you're right! I don't even know the name of the package anymore, I've fixed the instructions in the PR.

I have published all the changes to other packages, so as long as you have google_maps_flutter: 0.5.30 and google_maps_flutter_platform_interface: 1.0.4 (latest published), you should only need to add the git dependency on the web package (check your pubspec.lock for the versions that you're currently using!).

ditman added 19 commits August 18, 2020 15:03
* Sanitize title/content to prevent XSS
* Open InfoWindow automatically on marker click
* Do not render infoWindow if it's empty
* Update contents of infoWindow alongside its Marker
…roller. Substitute direct access by semantic methods. Use those methods in the platform implementation instead.
* Add a few changes to the controller to allow for overrides when
testing.
* Make some conversion functions more null-resilient.
* Fix some inconsistencies in some conversion function naming.
Also:

  * Add copyright notices to dart files
  * Add analysis_options.yaml file
  * Tweak build all script to let it know this package has its own
  analysis_options file.
  * Extract some types that were randomly strawn around the code to a
  types.dart file.
@ditman
Copy link
Member Author

ditman commented Aug 18, 2020

(Rebased to get the latest changes to the build scripts from master.)

@ditman ditman requested a review from cyanglaz August 18, 2020 22:04
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 027827f into flutter:master Aug 19, 2020
@ditman
Copy link
Member Author

ditman commented Aug 19, 2020

This has been published and tagged as v0.1.0:

https://pub.dev/packages/google_maps_flutter_web

jarrodcolburn pushed a commit to jarrodcolburn/plugins that referenced this pull request Aug 20, 2020
This package introduces the first version of the google_maps_flutter_web plugin. See README for installation instructions.

Co-authored-by: chung2012 <[email protected]>
@ditman ditman deleted the gmaps-web branch August 25, 2020 22:02
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this pull request Oct 10, 2020
This package introduces the first version of the google_maps_flutter_web plugin. See README for installation instructions.

Co-authored-by: chung2012 <[email protected]>
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
This package introduces the first version of the google_maps_flutter_web plugin. See README for installation instructions.

Co-authored-by: chung2012 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants