google api jason add key

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

I have an issue with a google map api script. it has stopt working.

i have the following function and need to add probably need to add only the key.

Public Function GetDat(start As String, dest As String)

Dim firstVal As String, secondVal As String, lastVal As String, cc As Integer

GetDat = 1

firstVal = "[login to view URL]"

secondVal = "&destinations="

lastVal = "&mode=car&language=pl&sensor=false"

Set objHTTP = CreateObject("[login to view URL]")

URL = firstVal & Replace(start, " ", "+") & secondVal & Replace(dest, " ", "+") & lastVal

[login to view URL] "GET", URL, False

[login to view URL] "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

[login to view URL] ("")

If InStr([login to view URL], """distance"" : {") = 0 Then GoTo ErrorHandl

Set regex = CreateObject("[login to view URL]"): [login to view URL] = """value"".*?([0-9]+)": [login to view URL] = False

Set matches = [login to view URL]([login to view URL])

tmpVal = Replace(matches(0).SubMatches(0), ".", [login to view URL](xlListSeparator))

Dist_km = CDbl(tmpVal)

If InStr([login to view URL], """duration"" : {") = 0 Then GoTo ErrorHandl

Set regex = CreateObject("[login to view URL]"): [login to view URL] = "duration(?:.|\n)*?""value"".*?([0-9]+)": [login to view URL] = False

Set matches = [login to view URL]([login to view URL])

tmpVal = Replace(matches(0).SubMatches(0), ".", [login to view URL](xlListSeparator))

Time_sec = CDbl(tmpVal)

cc = InStr([login to view URL], """origin_addresses"" : [")

If cc = 0 Then

GoTo ErrorHandl

Else

New_adr = Mid([login to view URL], cc + 24, 500)

cc = InStr(New_adr, "]") - 3

New_adr = Left(New_adr, cc)

End If

cc = InStr([login to view URL], """destination_addresses"" : [")

If cc = 0 Then

GoTo ErrorHandl

Else

Old_adr = Mid([login to view URL], cc + 29, 500)

cc = InStr(Old_adr, "]") - 3

Old_adr = Left(Old_adr, cc)

End If

Exit Function

ErrorHandl:

Dist_km = 0

Time_sec = 0

New_adr = ""

Old_adr = ""

GetDat = -1

End Function

Excel Macros Google Maps API JSON

Project ID: #17822887

About the project

4 proposals Remote project Active 5 years ago

Awarded to:

SidhuSushma

Hi, Hope you are doing well! I have read your job description along and assure you that I am a perfect fit for the job. I have experience with PHP from last 6 years and I have excellant web development skills More

$25 USD in 1 day
(0 Reviews)
0.8

4 freelancers are bidding on average $26 for this job

sloker18

I am proficient with excel macro/VBA development, I have gone through your attached function I can modify the macro to perform the function as expected, if you are interested feel free to message me so we can go over t More

$30 USD in 1 day
(69 Reviews)
6.3
Chitanok

Hello sir, I would like to work on your api key installation project. Would you please share your link so i can check it? Thanks chitano

$30 USD in 1 day
(3 Reviews)
4.6