WebSite X5Help Center

 
Levent Kanmaz
Levent Kanmaz
User

Google maps  en

Author: Levent Kanmaz
Visited 1866, Followers 1, Shared 0  

I want to create a website. In this website I want to take the adresses from user as input values. Then with this variables should direct me to their coordinations and for this I want to use google maps. I need to take this coordinations as values for the solution. How can I do this?

Posted on the
1 ANSWERS
Tom G.
Tom G.
User

This is what I do:

Assuming that the parts of the address you have in variables your_Variable_1 and your_Variable_2 (but you can have the entire address in one variable).

In one of the “Page Creation” row, put “HTML Code” object:

In the Content, put this code:

In the Page Properties --> Expert tab, under “Custom Code:", choose "Before closing the BODY tag".

Put following code there:

If you cannot read fron the snapshot, here is the line:

document.getElementById("Map_Frame").src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBpiGf-qNlzyMrRhEbxO8mZG5QvHYHvd2c&q=" + your_Variable_1 + " " + your_Variable_2 + "&zoom=17&maptype=satellite"; }, 'text');

you can change the "zoom" value, to make the map more or less detailed, and "maptype" can also be "roadmap".

This is my result:

Read more
Posted on the from Tom G.