Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature request: attribute to display info when no street view is available #30

Open
davoutuk opened this issue Jul 9, 2023 · 1 comment

Comments

@davoutuk
Copy link

davoutuk commented Jul 9, 2023

Business problem:
Not all LatLng locations can be translated into a street view. Currently, if a LatLng has no street view then the widget returns a blank black image.
In this case, the user does not know why the the black screen is being displayed (e.g. software bug or something wrong with Google or no street view available)

New feature proposal:
Add a new attribute to the Street view widget that allow the developer to set a presentation value that would be displayed if no street view were available for a given LatLng.
This could either be:

  • a). a 'String? noViewAvailable' String attribute; or
  • b). a 'Widget? noViewAvailable' child widget attribute

For option 'a' this could be a string value like...

noViewAvailable: 'No view available for this location'
For option (b) this could be

noViewAvailable: Row(children: [Icon(Icons.block), Text('No view available for this location)]);

@zyzdev
Copy link
Owner

zyzdev commented Jul 11, 2023

The onPanoramaChangeListener will receive exception when the location is no valid panorama.
See example Street View Panorama events for usage.

FlutterGoogleStreetView(
...

onPanoramaChangeListener: (location, exception) {
    ...
},

...
)
no_valid_operation.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants