Google map

Hi, can you please add more option to work with google map on wix code.
$w(“#Thanks!!!:)”)

2 Likes

what options do you want?

Being able to place a map on a dynamic page, and link that to coordinates in a database would be nice.

That is doable. Read about Google Maps here in the forum how to populate it or on the API page.

$w("#myGoogleMap").location = 
{ 
  "latitude": 37.77065, 
  "longitude": -122.387301, 
  "description":"Wix Office" 
};

Or you can ask me to code the Dynamic Page including the code for you. But if you want to save money create the dynamic page, add the map and then in code after page has been loaded add the above code and get the values from the dataset on the page.

Is it possible to set location by address?
Thank you very much for the answer!!!:slight_smile:

Hi Ivan,
You can get the latitude and longitude of a certain address using Google’s Geolocation API .

Good luck!
Tal.

can you specify the zoom on the google map?

Hey Loree
If you make your own HTML Page with the Google Map you want you can set zoom, style it with Snazzy Maps or whatever you want. Then paste in the code in the HTML Component and then if need let Wix Code communicate with the HTML Component to set locations.

Pls, can you write me Wix code for ??- create the dynamic page, add the map and then in code after page has been loaded add the above code and get the values from the dataset on the page.

Hi Lukáš,
Here is a simple example to get your started.
Feel free to reach out to me if you need more help.
Good luck!
Ben

Any code idea to enable display map markers based on dynamic page items?
I have the geolocation map on the dynamic page which currently shows markers of all locations. But I want to display only markers at locations that carry a particular item from the dynamic item page.

I have two collections: 1. Locations contains (Latitude, Longitude, Name) of the establishments.
2. Items contains a list of items carried by the establishments .

A “field” in Locations collection (Multiple Reference) links and contains all the Items for each location.

Appreciate any help.

#friday