A
A
Alexander Generalov2017-11-29 14:41:24
Google
Alexander Generalov, 2017-11-29 14:41:24

How to place on the site (wordpress) a map with 60 stores from google my business?

There is a Google account my business with 60 stores.
Site on wordpress.
It is necessary to make a map to the site with the display of these stores pulling up from my business account.
Are there options? Someone faced?
Thank you in advance and I apologize if the question does not shine with knowledge and intellect :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2017-11-29
@LuckyGeneral2

GET https://mybusiness.googleapis.com/v4/{parent=accou...
TYNTS
Further, having all the locations and all the coordinates as standard
Insert objects on the map like this

#json в данном примере содержит полученые от гугла данные
                          for (i = 0; i < json.length; i++) {
                                var name = json[i].name;
                                var address = name;

                                var point = new google.maps.LatLng(json[i].lat, json[i].lng);
                                marker = createMarker(point, name, address);
                                bounds.extend(point);

                            }

                            map.fitBounds(bounds)

As a result, it will be like this
As a bonus, you can get reviews about each location, on this ^^^ page there are 3 last ones from all locations

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question