Calculate Coordinates to Address Maps Error

Hi there,

I have a list of locations stored with their latitudes and longitudes as show in the attached photo:

To drill down on a specific data point, you can see the lat and long in more detail here:

I have successfully design this list of locations such that a user can select and de-select items from a master list.

However, when I try to add those selected items to the map, it’s prompting me to put in more when I feel like my inputs have it covered as shown in this screenshot:

I’d love some help getting the map to populate my selected list of locations.

Are “latitude” and “longitud” of type number? You get this error if they are stored as text.

Hi @vargasjcamilo

Thanks for taking the time to reply. I ended up figuring out an alternative.

What was the alternative?

1 Like

I decided to use the Google Maps BDK plugin since it allows you to add pin descriptions. If you’re interested, I’m keeping track of what various Google Maps plugins for Bubble.io can and can’t do here: https://docs.google.com/spreadsheets/d/16pT15MxqzoB5ZqvNg1pQmEzqL_w533pcvvELJE3LPdo/edit?usp=sharing

I’d pay good money to anyone who makes a solid maps plugin that can take advantage of all (or even most) of what Google Map’s API has to offer.

I was using google maps before I realized how expensive it can be if you have a map heavy app…then I rebuilt things to use leafy as it can access mapbox and stadia

Prior to that I was using the basic google maps element from bubble in conjunction with marker mate

I thought marker mate was awesome and only wish I could still use it with leafy but there seems to be an issue with the two plugins on the same page as marker mate utilizes some HTML that doesn’t get rendered when used with leafy

with marker mate I was able to make some really nice custom marker popups.

I don’t think you’ll find something that does everything you need, however leafy can do these

and I believe these

If true, consider checking out leafy and see if it fits your needs…there are some additional features that could be added

I have spoken with @vini_brito about adding some features. He would probably be able to add any features you requested…it might be worth checking it out, and discussing with him the possibilities.

2 Likes

Leafy looks really cool! Unfortunately, route optimization (finding the most efficient path between two locations with multiple stops) is central to my app, and as far as I can tell, Leafy doesn’t do this (but I’d love for @vini_brito to tell me otherwise).

@boston85719
I have my eyes on that other thread since the first post (:
Since there’s a lot of info I postponed diving into it, but I looked into everything with a quick scan and nothing stood out as a potential problem.
And thanks for the mention!

@harrisonalley Who makes the route optimization is not the map element, but an external API that gives the map the data needed to draw the route (:
So yeah, Leafy can display routes and pretty much anything else, but let’s focus on routes, which already can be attained with the current Get Route from Stadia workflow action (:

I can’t tell how much it is optimized in relation to competing providers, but considering the possibility of someone providing a more efficient route, we can look into pretty much any provider out there and pick one that is more efficient than the routes coming from Stadia.

Or maybe Stadia already uses a standard (which is Valhalla) that is undefeated.
If you want to make progress on this, do send me a message (:

1 Like

@vini_brito I’m super excited to use your plugin. I have a couple of questions.

My show map on leafy map works maybe 20% of the time regardless of whether I use a stadia or mapbox map here: https://bubble.io/page?type=page&name=raw_google_test&id=route-manager&tab=tabs-2

When it doesn’t work, I receive the following general error:
Sorry, we have encountered an unexpected error. Please file a bug report (Help -> Report a bug), including error code 1594825761561x527375957105069600 and a step-by-step explanation of how to reproduce this issue.

And the following error when attempting to pan to a location:

The plugin Leafy Maps / action Pan to in a Leafy map threw the following error: TypeError: Cannot read property ‘panTo’ of undefined
at eval (PLUGIN_Leafy-Maps-element_action–Leafy-map-Pan-to-in-.js:3:14)
at https://dhtiece9044ep.cloudfront.net/package/run_debug_js/93df979cd6143785fbc9ec58e824668b0d5ed2cebbbc4911e196050ecc811d45/xfalse/x7:18:471882 (please report this to the plugin author)

Also, from Stadia’s documentation, I didn’t get the sense that all routes are automatically optimized.

Does your get route from Stadia workflow action automatically optimize the route?

Regardless, I’d love to be able to use Google Maps API’s route optimization to draw a route on my map if for no other reason than to have the user be able to choose, walking, biking, or driving.

I’ve attempted to draw a google route at that same link above: https://bubble.io/page?type=page&name=raw_google_test&id=route-manager&tab=tabs-2

Can you tell me what I’m doing wrong?

1 Like

I’m confused - in the original question it looks like you’re trying to generate a list of addresses from a list of lat & longs, but in your google sheet it says the BDK plugin can’t do that.

I am also looking to generate a list of addresses from a list of lat & longs and use it in the BDK plugin. Is this possible?

1 Like

Hi @Brenner,

You’re probably going to want to execute those steps separately; first reverse geocoding your list of lat/longs, and then mapping the resulting addresses (since I don’t know of a map plugin that can reverse geocode in bulk).

I also don’t know of any reverse geocoding plugins (though they certainly may be out there), but in my app I use the API connector with Google’s geocoding API to reverse geocode.

I decided to go with the BDK plugin, and use the CoordToAddress calculation.

My use case is plotting users trips to a given city on a map, and the behavior of the map when two people visit the same city is pretty shitty - it puts them both at the exact same address so when you drill down they’re at the exact same address of some random building. So I added some random noise to the lat/long before it picks an address