Map is not showing the correct location

My app’s URL: https://terrible-bird-3446.glideapp.io/

I see something similar with the map not showing the right location has been reported before, but I could not find a solution that worked. I will try to tell as detailed as possible what is happening.

I used a webcrawler (Botsol) to scrape information from Google maps, in this case I was looking for Museums in my area. I have the Name, Address, Website and the Plus code for the location.
Below are two examples of the retrieved data, these are two different locations in the same city:

Capture 1

The next screenshot is the map as it is shown in the app. For this screenshot I used the first address as the information to be shown. As you can see the map is showing a location in Salt Lake city, and not the intended address in Hungary.

Capture 2

I then changed the data to be shown on the map from address to Google Plus code. I get a different map now, but this time it is showing a location in Austria and still not the correct location in Hungary. Here is the screenshot:

Capture 3

When I click on the map when I have the app open on my phone the Google map app opens up, and in both cases it is showing the right location in Hungary.

Now we go back to second address, as shown in my first screenshot. This is another museum in the same village. If I use the address the map is showing the right location, but if I use the Plus code I see the same location in Austria as mentioned above.

I have checked the addresses, and they are both correct and look absolutely similar to me on how they are build up,

Then there is another issue, I have some addresses in the same city (not the same city as above mentioned examples) These addresses have all a different address, and a different Pluscode but they are all shown on the same location on the map. This location is in the correct city in Hungary, but they are not shown on the correct location. Below are two of the affected addresses, but there are plenty more on my list.

Capture 4

I really would like to know how to solve this. I hope it is my mistake, but I don’t think so :slightly_smiling_face:

I’m pretty sure Mapbox does not use Google plus codes. You need to obtain the actual geographical coordinates in decimal form and use that for the map location.

Hi Jeff,

That might be the case, but it is also not working for the normal addresses. These are normal street addresses, and not places in the middle of nowhere. I tried the Plus code only because the normal addresses had so many wrong locations on the map.

Mapbox isn’t the greatest at geolocating addresses. That’s why many people use coordinates instead. The bonus with using coordinates is that you are not limited to the number of map pins on a free glide account and it’s faster since the geolocating process is bypassed.

1 Like

OK, thanks. Let’s see if I can find a tool to convert Plus code into coordinates then.

1 Like

Google sheets can do it from an address with a simple formula. You have to be careful though because any changes in the sheet will rerun the formula and you can exceed your daily quota from Google quite quickly. There are several posts about this in the forum if you search, but many people use a Google script instead which will only query Google’s map API if coordinates have not been aquired yet. Do some searching and you should find several posts with formulas or scripts you can use.

1 Like

Just to make this thread complete, based on Jeff’s suggestions above I have been able to solve the issue. This is how I did that:
I installed the add-on named Geocode by Awesome Table in Google Sheets, in this Youtube video you can see how it works.

After running this add-on I had three extra columns in my spreadsheet, one with the full address, one with the latitude and one with the longitude. I had to combine the values of the latitude and the longitude in one cell in order to use them as location data. For this I created an extra column, and used the following formula to combine latitude and longitude:
=E1&", "&F1
Column E contains the latitude, and Column F contains the longitude in this example. The comma and the space are needed for showing the correct way of the coordinates.
In my app I now used the new coordinates column as input for the map, and this seems to work fine.

5 Likes

It’s not working for me, I only get strange coordinates that even google maps doesn’t recognize

I confirm that the add-on’s coordinates are completely wrong, with manually selected coordinates it works, but I’d prefer an automated tool doing it.