Closed newbieflutter closed 4 years ago
Hi, @newbieflutter I'm sorry but I could not understand exactly what your issue is. I tried to move the pin around then pressed current location icon which leads me to the current location. Then everything was working correctly/intended.
Can you specify more detail about what exactly you want to achieve, please?
Hi, Sorry maybe for the misunderstanding. Let me explain in detail.
On default when the map is open it points to the current location.
Then say I drag the pin to some where then it refresh and show the address there.
Then I press the current location icon which suppose to lead to current location. Here I have intermittent problem. a) At times it does not go to the current location immediately I need to press few times I wonder is it some debounce settings some where? b) At times it leads to the current location. but then the address box is not updated it remains where it was before . I think some refresh settings.
Can I off the top search box I mean disable it ? Cause I worried people will misuse and cost me money.
Hi, @newbieflutter
I followed your steps and the current location button was performing as intended (it goes immediately). I don't know why is the issue happening in your end.
There are two ways you can control about 'myLocationButton'.
However, there is no feature for hiding autocomplete searching bar as it is one of the core function for the package.
Please let me know if there is a further issue.
Hi , Actually my side the issue was not always its intermittent. Let me try your suggestion then I will update you accordingly. What does the myLocationButtonCooldown is that is the refresh rate after the last click where it become active is it? So if I keep it to 5 seconds is that ok ? Another thing using the locator package only does it still need the google map api or its using the local install google map as the play store ?
@newbieflutter
You can set 1 or 0 seconds to allow users to click my location button as much as they want. 5 seconds means user can only click the button once in 5 seconds.
I am sorry but I don't get what you are asking regarding the locator package. Are you asking about the usage of locator package?
If so, the locator package is for: a) Checking whether the location service is enabled. b) Fetching current position using GPS
Hi,
@newbieflutter
Good to hear it works as intended
Have a look at debounce timer for updating result. There are two debounce timers for the result. a) autoCompleteDebounceInMilliseconds (defaults to 500ms) b) cameraMoveDebounceInMilliseconds (defaults to 750ms) I think you need to change the second option and see if it works as you want.
Both. Whatever you use the google map service (Place API, Geo API or so), it all will be charged by google map API.
Hi,
@newbieflutter
Okay, now I got what you are trying to achieve.
It only happens when 'my location button' zooms in. By default, the searching is not triggered when zoom has changed. This is because my primary goal is to reduce API usage as possible as I can, and thus I do not want a user to get search result when they only zoom in/out on the same place (position).
So, in order to achieve what you want, searching must be allowed even when a user tries to zoom in/out.
Therefore, I just added [forceSearchOnZoomChanged] option so that you can set to TRUE if you want my location button to trigger place search every time.
But please bear in mind that this will also consume searching API when a user just zoom in/out on the same position
Update to 0.9.1 version when it is up to pub
Hi, I think thats is something is else. Nevermind I have tried to attached 3 pictures to help clear things.
The first picture is the initial place where the current location is.(initial picture)
I drag it to some else so the location change shoreline pear, mountain view, ca 94-43, usa.(moved picture)
So next I pressed the current location button the icon moves but see the location stays at this shoreline pear, mountain view, ca 94-43, usa. Look at this image (pressedcurrentlocation button)
Hope I am more clearer and now easier to see the issue now.
Have you tried what I told you? I can see the zoom has been changed in your 2nd photo. That is the reason searching is not performing.
Please update to 0.9.1 and set ‘forceSearchOnZoomChanged’ to true. I am pretty sure it will work.
Hi, Yes I have updated you can see. Unfortunately its the same though.
google_maps_place_picker:
dependency: "direct main"
description:
name: google_maps_place_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.1"
Here is my settings.
u``` sePlaceDetailSearch: false, cameraMoveDebounceInMilliseconds:100, autoCompleteDebounceInMilliseconds:100, forceAndroidLocationManager: true,
where is forceSearchOnZoomChanged setting?
Hi, I think looks like its working now I will further test on a real device and update accordingly.
Closing as the issue has been solved.
Hi, I have tried to move the map to different location from the current pin location. Then at time I press the current location icon it goes fast and stick there. At time I got press few times before it returns there? Is there any settings to control it?