Is WebMapLocation Broken?

Using examples from the documentation I’m getting an odd error when creating a WebMapLocation.

Example 1 Works fine:
dim location1 as new WebMapLocation(38.8977, -77.0366, “TheWhiteHouse”)

Example 2 Crashes with an exception “lexical error: invalid char in json text.”
dim location2 As New WebMapLocation(“Fenway Park, Boston, MA”)

I’m I doing something wrong. Ive got this in a button for testing only thing in the app is the mapviewer and a button which calls the above code. So I’ve isolated everything. Tested with 2024R1 and 2024R2.

@Jordan_Morris
I would check the double quotes if you did a copy and paste and make sure they did not end up as curly quotes.

I just tried on Windows 10 + 11 using Xojo 2024R2.1 and worked as expected.

No problems here. Please test:
WebMapLocation.xojo_binary_project.zip (10.3 KB)

macOS 13.6.8, Xojo 2024r2.1

Edit: what OS are you using? Is Firefox your default browser?

1 Like

Try: Xojo 2024 Release 2.1, Released: July 17th, 2024

Looks like its a Firefox (129.0.1 (64-bit)) Issue Changed my default browser to Edge then Chrome both of those worked with both your Sample project and my test project. Your sample project did not work in my version of Firefox got the same error “lexical error: invalid char in json text.”. Further testing I’m getting this on both OSX and windows 11 when using Firefox other browsers are fine.

Yes, this issue only happens if Firefox is your default browser.

For some reason the Geocoding provider (Nominatim) blocks Firefox. Maybe they haven’t updated the user-agent.