Get data(street name) from geocoder google api

ja consegui !!!

1 Like

Hey there… again. I am so sorry to bother y´all but I am sure I´ve follwed your instructions and I don´t know why this thing is still messed up.

This is my json file

[
{
“Answer”: “Answer A”
},
{
“Answer”: “Answer B”
},
{
“Answer”: “Answer C”
},
{
“Answer”: “Answer D”
}
]

This is my design in which you can see the local file is uploaded

And these are my blocks

I´ve tried different file extensions: .js , .json and .txt
And I don´t know why on my app Label still says “Label”

I´d appreciate your help

1 Like

David,

The key that you use in your Local Storage Get block needs to be exactly that same as the key that you presumably used in a Local Storage Save block somewhere else in your app.

In the meantime, you might want to first just set your label to the JSON value returned by your Local Storage Get block (you might also want to increase the width and height of the label so that it will fit all the JSON). Assuming that the JSON looks good, you might then want to display the result of your 'get property ...' blocks (you can use 'generate JSON from object' to convert that value to displayable JSON). Doing these steps will help you to debug your blocks and see where the error might be.

If none of the above help, could you post a share/copy link of your project (here’s how)? That might allow us to give you more help.

-Mark

2 Likes

Im able to extract the place names of my surrounding location, but i need the photo reference as well which is in the json list from the api but now i need also extract the phto reference, why can i do it with “name” but not “photo reference” - what json path am i missing?

see the blocks pls:

also this is what my json result looks like from the url:

{
“html_attributions” : ,
“next_page_token” : “CqQCFwEAAPlMLjSfkOtUDbFa7SSiMqDp6_tUGbCLDmM4euas9MrP51PZCSVx3GtKlYXRdritUYz4WA_qkBbBZ_5b833VV5sPPNHJeDt9otfDuNXSVKuuY-MvTcGAlwCqjxSAxtaA5SHn05PP1kr-IAMoN8yknh7gAIKAbX6i86cKfhw6SGPgfSxo6BMyWlYfriJqcReqES2sNtsqQ0DR6SkAzZDoPdAR8qt9ehLSWPeE8Pe3H6i7GOXE2Df_Jvf_gZiQC0rH_ytGBtUnEBWvJwZyzqqnqhWg1V2AuB7QXQseJtoDZgyDYWN3vJNMdqB8yOtYkLOZ4Q6M9ANZ-LIcod2Og56kWpb8c_DOSY8o6WhfJdGiylKvXfTdUa4UtoV-c3ypY6iLZRIQI7DCTqEqXFOyB_nmxuBoaBoUkkt7hymQyGtfVAf4RfajiJ1TMu8”,
“results” : [
{
“geometry” : {
“location” : {
“lat” : -29.7870389,
“lng” : 31.02204219999999
},
“viewport” : {
“northeast” : {
“lat” : -29.7457011,
“lng” : 31.0673288
},
“southwest” : {
“lat” : -29.8121719,
“lng” : 30.990419
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png”,
“id” : “2481b08a523fa7dfcc52339521fb6289d93880cf”,
“name” : “Durban North”,
“photos” : [
{
“height” : 1836,
“html_attributions” : [
“\u003ca href=“https://maps.google.com/maps/contrib/116936888055646766012/photos”\u003emuhummed bhayla\u003c/a\u003e”
],
“photo_reference” : “CmRaAAAA4fDIxCIg1tlptb_xfUweNmPIb8yXE64UbcDO_5CFVi2la0RbXC6qUAT2cumALD4akUQep1ug8BJ9K9dpT7uGvm53MFfVoXgjnByRpVWRiYZIMp0XbHnQVbokD86IRGdMEhAyubYZ7nLSGPkRUIuTHO45GhQN1A34hZaQYZMl4mrreOlqcvv_gA”,
“width” : 3264
}
],
“place_id” : “ChIJ04EcnZEG9x4Rr-9fNPScsTo”,
“reference” : “ChIJ04EcnZEG9x4Rr-9fNPScsTo”,
“scope” : “GOOGLE”,
“types” : [ “locality”, “political” ],
“vicinity” : “Durban North”
},
{
“geometry” : {
“location” : {
“lat” : -29.771907,
“lng” : 31.037212
},
“viewport” : {
“northeast” : {
“lat” : -29.7705679697085,
“lng” : 31.03858208029149
},
“southwest” : {
“lat” : -29.7732659302915,
“lng” : 31.03588411970849
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png”,
“id” : “44ef45566537d9237dd047767a98a100d72b8584”,
“name” : “Duikerfontein B & B”,
“photos” : [
{
“height” : 2988,
“html_attributions” : [
“\u003ca href=“https://maps.google.com/maps/contrib/115866465107119235256/photos”\u003eRudi Rabie\u003c/a\u003e”
],
“photo_reference” : “CmRaAAAAgxNwa1D-bHFzlZD5uB0-4uOjXkD5BB4uIUM72lD6zmvMbONo_UpMgSHE1Y5_jsAkdT44XOWalmNI4H9jV8RgerJ5AuXvfn-S7dXkHhNeieN7EXFM2IlUsiejCNAMiUb9EhBh4lpRTbgcf6H0Y5a5H0AtGhT26GIRsf-gvvHaU9_Icolgraa_xg”,
“width” : 5312
}
],
“place_id” : “ChIJM1QVkGAG9x4R_I_fl0FSqq8”,
“plus_code” : {
“compound_code” : “62HP+6V Durban North, South Africa”,
“global_code” : “5G2H62HP+6V”
},
“rating” : 4.6,
“reference” : “ChIJM1QVkGAG9x4R_I_fl0FSqq8”,
“scope” : “GOOGLE”,
“types” : [ “lodging”, “point_of_interest”, “establishment” ],
“vicinity” : “135 Umhlanga Rocks Drive, Durban North, Durban”
},
{
“geometry” : {
“location” : {
“lat” : -29.776884,
“lng” : 31.037772
},
“viewport” : {
“northeast” : {
“lat” : -29.7753892197085,
“lng” : 31.0391405802915
},
“southwest” : {
“lat” : -29.7780871802915,
“lng” : 31.0364426197085
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png”,
“id” : “36e7d67cadae264c1c70b747b78d72a8ac2c4dd6”,
“name” : “Beachway Cottages”,
“place_id” : “ChIJNzllx14G9x4RvArtT5M0eC8”,
“plus_code” : {
“compound_code” : “62FQ+64 Durban North, South Africa”,
“global_code” : “5G2H62FQ+64”
},
“rating” : 5,
“reference” : “ChIJNzllx14G9x4RvArtT5M0eC8”,
“scope” : “GOOGLE”,
“types” : [ “lodging”, “point_of_interest”, “establishment” ],
“vicinity” : “12 Beachway, Durban North, Durban”
},
{
“geometry” : {
“location” : {
“lat” : -29.776306,
“lng” : 31.034142
},
“viewport” : {
“northeast” : {
“lat” : -29.7750286197085,
“lng” : 31.0356409302915
},
“southwest” : {
“lat” : -29.7777265802915,
“lng” : 31.0329429697085
}
}
},
“icon” : “https://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png”,
“id” : “3e5c222446e9ae80f0508818d86e1d758f527e00”,
“name” : “Flying Solo”,
“opening_hours” : {
“open_now” : false
},
“place_id” : “ChIJLb7AeV8G9x4RfUAkEnb4zlk”,
“plus_code” : {
“compound_code” : “62FM+FM Durban North, South Africa”,
“global_code” : “5G2H62FM+FM”
},
“reference” : “ChIJLb7AeV8G9x4RfUAkEnb4zlk”,
“scope” : “GOOGLE”,
“types” : [ “travel_agency”, “point_of_interest”, “establishment” ],
“vicinity” : “39 Umhlanga Rocks Drive, Durban North”
},

1 Like