Victor
Victor

Reputation: 13388

Where does website like this store its Google Maps marker details?

I've noticed that some websites don't really expose the Maps details (longitude, latitude) in the source. I wonder what practice do they use. I tried to look at the source code, but still couldn't find where the code lies.

Here's an example:

https://squareup.com/retail/search/10001

Do they use external JSON file or what? I still couldn't find though.

Reason I am asking because I will have maps that show multiple markers too, but having them listed in the source is a little messy. Thanks.

Upvotes: 0

Views: 85

Answers (1)

Jon Friskics
Jon Friskics

Reputation: 282

If you inspect the request on page load with something like Firebug (or any inspector), you'll see a URL like this: https://squareup.com/retail?lat=40.75368539999999&lng=-73.9991637 that is an Ajax request that returns a JSON response object.

So, that means that there is a server-side script that is being used to retrieve a set of marker data - probably read from a database.

Upvotes: 1

Related Questions