Uber Map Pin Drag

You can control the zoom on the map, so you can get fairly fine control.

Hi All,

@emmanuel @georgeciobanu

I’ve changed my app to use this new “pin drag” for selecting an address…but what I have found is that my conditions based on distances are no longer working when reference the “map’s center address”, and I have a feeling this may be a bug with Bubble.

for instance:

In the example below I am comparing the distance between these two address (next door to each other), if they are within 10kms then display “yes”.

To help debugging I am also display the raw distance in kms as I move the map around and have noticed that the value only changes in decimals…is this a bug?

here is the link to the test app: https://reso_test.bubbleapps.io/version-test/gmap?debug_mode=true

thought I also paste the condition settings

I agree

Not helpful I know … But distance from between current position and map centre looks OK to me.

Bubble map support is currently a little flaky, so beware.

@NigelG

I’m interested to know if any where in your test app you are showing the actual distance in miles/kms between an address and map centre address?

From what I am experiencing, even when the two addresses are only a door down from each other the values are incorrect and thus conditions based on the distance do not work.

Yes, it is miles between map centre and current.

Which can get down to a small value if you manually move the map.

But there is something odd in the way it centres the map on current position, so if you zoom in you are several miles away from “current position” even though the address is correct.

So yes, there looks to be some sort of issue with positioning the map, but the distances work.

I am currently discussing something similar with George, in that on page load the map centre is not set (although if you slow down the page with debug it works !) So this might be the same.

@NigelG

I am still not convinced that the distance is being displayed correctly, I assume the number I have highlighted in red is the distance between the two addresses in mile?

if so, this is not correct.

I know Oz is a big place… But not that big !

Is the map’s centre correct on the map ? So is it the same as the map address ?

@NigelG :slight_smile:

yes, the map’s centre is correct, I had a similar setup on my post earlier, showing the incorrect distance when current position and map centre address were right next to each other and yet the kms/miles distance was way up there!

I have just had the same issue, two addresses next to each other but several thousand miles apart when calculated.

But went away on page refresh.

I did notice your saved location had a longitude of -180.

@NigelG

Yes and that never changes as I moved the map around.

@NigelG

good pick-up on the longitude value, I have done more investigating and now I strongly believe that there is a bug.

so, here are the Lat/Long details from the Bubble element in the red box.

and these are the Lat/Long from the Google Maps site for the same address.

The longitude in the Bubble element does not change as the map is moved around.

@georgeciobanu @emmanuel I’m happy to raise a defect case but its already well documented here.

1 Like

Please file a bug report, that’s much easier for us to process. Thanks

Hi everyone,

There was indeed a bug here and it should now be fixed. Please email us at support@bubble.is otherwise.

Cheers!

1 Like

HI @georgeciobanu I believe this is still an issue so have emailed support as instructed above. I hope the team can help me on this

Hi emmanuel… thanks for that example, very good. However I have found an error when you try to drag the map to Malaysia. ‘General error: LocationService: Error requesting places’. Any ideas on this? If you want to emulate the error, zoom out of the default start address until you can see the entire globe, drag the left (towards asia) then the error will appear. Curiously - if you drag to the right then there will be no error. I think it has something to do with crossing the international date line.

Also, I’m having a bit of trouble with getting exact coordinates from Center Address… It’s as if the system takes the closest address it can find and then returns the coordinates of that address… would it be possible to have an option that gives the exact coordinates of the centre without searching for the address first? - I think the problem is where the address hasn’t been well catalogued in google maps - in some areas of my town it works, but the area near my university it seems imprecise… what i noticed is that google maps hasn’t categorised the streets in that area, so no ‘address’ is possible. see the screenshot below:

This is a link to the area on google maps: Google Maps

Unfortunately the center map pin keeps flashing in both Chrome and FireFox browsers and reacts super slow to my drag positions :frowning:

1 Like

Did you ever manage to solve the flashing map pin issue?