C
C
campus12019-02-06 13:14:31
JavaScript
campus1, 2019-02-06 13:14:31

How to unpartition a google maps string and get the data from the link?

Hello. There is a backend on node.js + express and a front-end on react.
From the front-end comes a url line with google maps:

https://www.google.com/maps/place/Tatsu's+French+Restaurant/@38.9657263,-94.6407024,17z/data=!3m1!4b1!4m5!3m4!1s0x87c0e95a36a3084b:0x31207aa567ecad85!8m2!3d38.9657263!4d-94.6385137

I need to do the following thing on the back end:
1. Validate it - this line should include ( place, data, and geo coordinates )
2. I need to find out the name of the place (person) and photo from this link.
I tried doing something like this:
const request = require("request");
request(
 "https://www.google.com/maps/place/Tatsu's+French+Restaurant/@38.9657263,-94.6407024,17z/data=!3m1!4b1!4m5!3m4!1s0x87c0e95a36a3084b:0x31207aa567ecad85!8m2!3d38.9657263!4d-94.6385137",
  function(error, response, body) {
    console.log("error:", error); // Print the error if one occurred
    console.log("statusCode:", response && response.statusCode); // Print the response status code if a response was received
    console.log("response:", response);
  },
);

But something in the answer I do not find the necessary data.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question