fysoul17 / google_maps_place_picker

Place picker on Google Maps for Flutter
MIT License
224 stars 367 forks source link

Map opening is very slow on iOS device, why it is? #26

Closed jasprit closed 4 years ago

jasprit commented 4 years ago

When we open map on iOS. it took around more than 30 sec to initialize the first view

fysoul17 commented 4 years ago

I am not sure what is the problem based on the information what you provided. Can you provide more information, please?

Such as,

Parameter settings. flutter doctor -v. etc.

Or can you try with another device/simulator on other mac if the same issue happens? Also with different internet connection condition.

It only takes less than 2~3 seconds on my side, which works the same as android.

fysoul17 commented 4 years ago

Closing as there is no further update. Feel free to update any issue to re-open it.

sanu-krishnan commented 2 years ago

Facing the same issue on physical iOS devices. Loads faster (1-2 seconds) in simulator, but takes too long in real devices(10-20 seconds)

Version : google_maps_place_picker: ^2.1.0-nullsafety.3. (tried older versions as well) Flutter version : 2.5.1

Code:

child: PlacePicker(
        apiKey: AppConstants.gmapsApiKey,
        initialPosition: LatLng(
          _pickedLocation?.lat ?? _initialPosition.latitude,
          _pickedLocation?.lng ?? _initialPosition.longitude,
        ),
        useCurrentLocation: true,
        selectInitialPosition: true,
        usePlaceDetailSearch: true,
        autocompleteLanguage: translation.isArabic ? "ar" : "en",
        autocompleteTypes: const [],
        autocompleteComponents: [
          geocoding.Component(geocoding.Component.country, "kw")
        ],
        hintText: translation.of('customer.search_address'),
        selectedPlaceWidgetBuilder:
            (_, selectedPlace, state, isSearchBarFocused) {
          debugPrint(
            "state: $state, isSearchBarFocused: $isSearchBarFocused",
          );

          if (isSearchBarFocused) {
            return Container();
          } else {
            return _buildBottomFloatingCard(
              state,
              selectedPlace,
              context,
            );
          }
        },
      ),
gsoykan commented 2 years ago

https://github.com/fysoul17/google_maps_place_picker/issues/43#issuecomment-1049752540