Why does my app say Error 1109 invalid URL when the url is valid? How do I get the latitude and longtitude from this json file?

So I'm trying to create an app to calculate the distance (km) between two points and in order to calculate the inputed location, I use Geocode to get the coordinates and then apply the haversine formula. the problem here is the result which is a json file that can't seem to collect the key or value somehow.. I don't understand the problem.


this is correct right?
image
this is my url I tried opening it and it should work... soI don't get why the dictionary can't get the latitude and longtitude...

show the raw content of your responseContent

sure here it is:
{
"results" : [
{
"address_components" : [
{
"long_name" : "Bryan",
"short_name" : "Bryan",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Brazos County",
"short_name" : "Brazos County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Texas",
"short_name" : "TX",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Bryan, TX, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 30.730455,
"lng" : -96.245722
},
"southwest" : {
"lat" : 30.590893,
"lng" : -96.46075900000001
}
},
"location" : {
"lat" : 30.6743643,
"lng" : -96.3699632
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 30.730455,
"lng" : -96.245722
},
"southwest" : {
"lat" : 30.590893,
"lng" : -96.46075900000001
}
}
},
"place_id" : "ChIJmVMC17yBRoYRcUziFqi05ZU",
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
this is an example

Which lat/lon did you want to return, there are five sets ?

Try with this:

image

In AI2, list indexes start at 1, not 0.

oh ok

the lat/lon is the one from the "location" key

it still says invalid URL

but you just provided the responseContent? (or was that from running a GET in your browser?)

I'm sorry what do you mean?

oh uh the response content was yes a GET from my browser from the API link:
image
the API key is already correct I checked

You may need to uriEncode the content in Textbox1.Text. There is a block for this in the web component. Make sure you use the uriEncode (and not the uriDecode ) block.

I don't have a geocode project setup, so can't really test further, and just keep guessing, unless you share the API key (you can do this via private message)

how do I send a private message?

also do you mean like this?

WAIT NO WAY NO WAY NO WAY TYSM SO TURNS OUT MY PROBELM WAS (tysm you helped me find it)


was this- it's supposed to be Web2

To set an url in web1 and then call web2.get can't be a correct solution....
Why are there 2 web components?

Taifun

eh- I mean like the set Web1 should've been Web2 ( i need two because I'm calculating two locations