Google Distance API Assistance and Wix's unwillingness to help :-/

Hello,

I am in need of guidance regarding calculating the distance “in miles” between a pickup and dropoff destination.

For the “Backend”

import {fetch} from ‘wix-fetch’ ;

export function distance() {
const key = “AIdvSyDypwabcgedtE_F4rdg-cLhlmnU” ;
const url = “https://maps.googleapis.com/maps/api/distancematrix/json” ;
const DistanceUrl = url + “?origins=” + $w( “#pickupAddress” ).value + “&destinations=” + $w( “#dropoffAddress” ).value + “&key=” + key;
return fetch (url, {method: ‘get’ }).then( (httpResponse) => {
if (httpResponse.ok) {
console.log( “OK” );
return httpResponse.json();
}
})
}

My understanding of this code is:

we are constructing the URL that will fetch information from maps. googleapis and will fill in the search query for ?origins= and &destinations= to form a COMPLETE URL and Results Such as:

https://maps.googleapis.com/maps/api/distancematrix/json?origins=washington,%20dc&destinations=new%20york,%20ny&key=APIKEY

and this will generate a response in the URL of the following JSON:
{
“destination_addresses” : [ “New York, NY, USA” ],
“origin_addresses” : [ “Washington, DC, USA” ],
“rows” : [
{
“elements” : [
{
“distance” : {
“text” : “367 km”,
“value” : 367441
},
“duration” : {
“text” : “3 hours 52 mins”,
“value” : 13948
},
“status” : “OK”
}
]
}
],
“status” : “OK”
}

now, for my “Page Code”
import {distance} from ‘backend/gapi’ ;

export function Calculate_click(event) {

distance().then( function (resp) {
console.log(resp);
});

}

My understanding is when “Calculate” is clicked, It will import the DATA from my BACKEND code and log the results.

Here is my problem:

I cannot figure out how to correctly code this information.

I have 2 address inputs & 1 button

1 = Pickup Location
2 = Dropoff Location
Button = “Calculate” on-click

I simply need help getting the “Distance in miles” between the two locations on click.

I have setup my API and enabled Places, Geolocation, Gecoding, Maps Javascript etc and Billing has also been enabled.

Here is a link to my original post 1 week ago, which includes screenshots if necessary

I have also reached out to HIRE wix experts using Wix’s platform and everyone I have reached out to has not responded.

It is frustrating to see employees of Wix respond to users after just 30 minutes of posting into the forum and I have waited a week and was told I have a limited amount of times I can ask for assistance, without my posts for “HELP” being internally deleted.

I recruit TONS of business to wix and have transferred many clients over to their platform. As a loyal patron of WIX, all I am seeking is guidance from the very platform that advertises its willingness to help.

My emails to wix support are ignored. Setting up phone call requests have been ignored. and now my forum posts are being ignored.

It is becoming clear that wix is no longer a platform willing to help assist its users & developers. You are on your own.

This is about the fourth or fifth post on the same question…

Understand that this forum is not a support site . It is a community of Corvid developers and users where coding and development topics are discussed and information shared. There is no assurance that users will find their answers here. A certain level of competence is expected when asking questions here on the forum. For that, Wix provides many resources to help users learn how to get the most out of Corvid. We encourage users to take advantage of these resources which include video tutorials, full app examples (which can be loaded into the user’s editor), API documentation, and a wealth of articles describing a wide range of topics - from beginner to advanced. For those users who need coding assistance, it is possible to find expert developers on the Wix Marketplace an online marketplace with top Corvid web developers from around the world.

There are various examples using Google and other APIs available on the Examples page . Your question is specifically about a Google API. I’m sure they will be willing to assist you - for a fee.

Yisrael,

you had no problem helping this gentlemen. As soon as i asked a question under this referenced post, the post was “Closed”.

You state because I am incorporating Google API to ASK GOOGLE!!

Truth is, you choose NOT to help me. Because I see posts where you actually do great work and decided to be helpful regarding the same exact issue. You took the time to speak with him, gave him code and helped him be successful.

not one time did you tell him you were unable to help. Not one time did you tell him to ask Google because it is not your problem. You viewed his code and gave examples beyond sending the Google API Link.

here is ANOTHER example:


a “Corvid Master” says “In order for us to help you, please demonstrate you tried to find a solution” not once have a I seen… WE ARE UNABLE TO HELP YOU. ASK GOOGLE. (until today)

But thanks for the clarity! It is clear you pick and choose WHO you want to help. And I am not one of them .

Luckily for me, I am more capable than you know :slight_smile:

Enjoy you day

I “chose” not to answer because the the question has already been answered - as you point out, answered twice. Since you are capable, this should give you plenty to go on.

Wix cannot support 3rd party services. The support I provided in the past was a result of just having finished a learning experience with the Google API, and I may have also just happened to have had the time when I did it.

Again, this forum is not a support platform . It is a community . A lot of users come here for help. The Wix team tries to help when we can, but we have many other tasks that we are responsible for. When a topic has already been discussed, and answered , it will be the last thing that gets our attention. I saw that the answers that you referred to were what you needed, so I decided to assist other.

As far a WHO we choose to help, I remember providing assistance to you many times in the past. There’s only so much to go around. I certainly did not intend to slight you, and I certainly don’t intend to slight anyone else that I don’t answer. It’s all a matter of resources.

Yisrael,

It is clear my statement has been made and proven at this point.
Every sentence you write further validates my point and position in the matter.

Please, continue supporting the wix community “selectively” and stop bantering back and forth with me.

I have since resolved my issue on my own :slight_smile:

enjoy your day! Glad I finally got your attention.

Its unfortunate that negativity is required. 5 posts and you appear :slight_smile: still with no helpful information. I was only seeking clarity but you continue to refuse, so whats left to discuss.

I have a board meeting in a few weeks, and we will be pulling our 100+ clients and COUNTING from Wix Platform and will be discussing the reason for these changes on my VERY POPULAR Youtube channel and 236,000+ subscribers.

Thanks for the information! I will let other know this is not the platform to use if you want any amount of unbaised support.

Once again, enjoy your day.

I can exist without WIX. Please remember that :wink:

PS.

you got so “in your feelings” you forgot to inform me about why wix support via phone and email do not respond to myself or clients???

Care to share the policy on that part as well?

I have numerous reports, references, emails and records to show NO ONE can speak with WIX Support Staff. I have had 10 clients websites completly DELELETD into thin air! with no response from WIX on why? what happened? why they cannot login? etc.

I have SAVED your reputation more times than I can COUNT. Rebuilding their platforms OVERNIGHT because WIX cant seem to address anything anymore.
So do you need those details???

We have tried contacting wix UNRELATED to this post, for MONTHS.

I am currently gathering ALL the data you need. My frustration is beyond calculating 2 fields. This has to do with being ignored in every aspect WIX has to offer. While my company and affiliates try to uphold an amount of LOYALTY to the WIX brand in itself.

But I will not continue to convert clients on your behalf. This ends today.

So please, Let me know where to send you this DATA and email exchanges, so you can have a clearer picture of why not only myself, but staff and clients feel ignored and how i’ve helped RETAIN your customers, out of a true love for the WIX platform.