Open tazik561 opened 3 months ago
same, any other library alternative?
I fix this bug by using this branch: https://github.com/anggaaryas/flutter_google_places_sdk/tree/google_places_sdk_web/remove-ssrc
@tazik561 you should not add the <script>
tag your self, the library already does it.
The aim is for the library to do as much stuff for you as possible
As a temporary workaround, I recommend creating your own script with id = flutter_google_places_sdk_web_script_id
, before calling the initialize.
@tazik561 fyi
As a temporary workaround, I recommend creating your own script with id =
flutter_google_places_sdk_web_script_id
, before calling the initialize.@tazik561 FYI
Thanks all Guys but I fixed it before, Just I added this issue to keep logging. Just in your code before adding the script check if Google API was initialized or not. if initialized and there is a Google API script in the Html ignore adding the script again. Locally I fixed it and now everything is ok
like codes I did:
bool googleMapsLoaded = js.context.hasProperty('google') &&
js.context['google'].hasProperty('maps');
if (googleMapsLoaded ) {
_doInit();
}
This library should have this condition, just in case
When I am using this library with flutter google map in 1 page and I want to get new location and move camera I get this error:
Caught error: InvalidValueError: not a LatLng or LatLngLiteral with finite coordinates: in property lat: not a number
after a lot s of investigation I got the reason is this package. when I removed this package and directly I used Google Place API my issue was solved but when I used this package to get a new location I had the same issue. On the Chrome console, I have these errors:
I also added my config in my HTML :