Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Add Web support #43

Open
ZdenekKrcal opened this issue Jan 4, 2023 · 7 comments
Open

Add Web support #43

ZdenekKrcal opened this issue Jan 4, 2023 · 7 comments
Labels
state:wanthelp This issue cannot be addressed by the main maintainer, but PRs are welcome type:feature This is a question or request of a feature that shall be implemented if it does not exist

Comments

@ZdenekKrcal
Copy link

Hi, thank you for the great plugin but could you add web support? Thank you.

@digitaltrustkz
Copy link

yes, please, definitely web support is needed.

@martin-braun
Copy link
Member

martin-braun commented Jan 6, 2023

The problem is the Google plugin only supports Android and iOS. Luckily there is https://pub.dev/packages/google_maps_flutter_web which could help to solve the problem, it's just that I barely have time for this right now, but PRs are welcomed as always.

@martin-braun martin-braun added the type:feature This is a question or request of a feature that shall be implemented if it does not exist label Jan 6, 2023
@martin-braun martin-braun added the state:wanthelp This issue cannot be addressed by the main maintainer, but PRs are welcome label Jan 16, 2023
@ouvreboite
Copy link

@martin-braun it seems google_maps_flutter now supports the web target.

@martin-braun
Copy link
Member

@ouvreboite Cool, would you be interested in giving it a shot? :)

@ouvreboite
Copy link

@martin-braun sure. I've poked around a little:

Thanks to your 3.1.0 release, we already got a web-compatible version of google_maps_flutter

  • Displaying the map already works for the web 🥳 (we just need to add the google map JS package in the HTML head, otherwise you get an ugly JS error at runtime)
  • Places search and geocoding fails 💀, due to a CORS issue. Apparently it's because we use the "backend API" for Google Places, with is not supposed to work on web apps. Maybe switching from google_maps_webservice to flutter_google_maps_webservices would help.

I'll keep digging and propose a PR if I find a way to make it work.

@martin-braun
Copy link
Member

martin-braun commented Jul 19, 2023

@ouvreboite Wonderful. Please upgrade to 3.1.1 though, 3.1.0 caused some dependency issues, but it might be that you are not affected by this (I was).

Also, the google_maps_webservice package is just cancer due to its age, thus should be replaced anyways, so I'm glad that you are incorporating an alternative. This old package is simply not updated anymore and I'm more than happy to replace this ancient left-over with something fresh.

When you are ready, please do your PR on the dev branch, and change only necessary bits, so the changes can be overviewed in a faster pace.

Thank you, good job so far. :)

@guhakashyap-kabam
Copy link

@martin-braun im a user of your package, and i've been waiting for an update to this - have you been able to get this to work yet?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state:wanthelp This issue cannot be addressed by the main maintainer, but PRs are welcome type:feature This is a question or request of a feature that shall be implemented if it does not exist
Projects
None yet
Development

No branches or pull requests

5 participants