How to use Google Map Static API in CHS?

More
1 month 3 weeks ago #52106 by JIANPING
Google Map supplies a static API to show map image by URL parameters.
How to use it in CHS?

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #52107 by JIANPING
Here is the steps to show Google Map by static API.
1. You need to enable Google MAP static API in your google account, then get the API_KEY of the API.
2. In CHS page editor, put an Image component and a Label component.
3. Paste the API URL into the Value of Text property of the Label.
Link the Text property to a variable called "url", set the "IO" direct to "Out".
4. Link the variable "url" to the imgOff property of the Image component.
5. Finish.
*NOTE, Because you can not edit the text value of imgOff property of Image directly, you need to use a Label component as an intermediary.
*NOTE, please do not use HTML frame, because Google Map static API has the x-frame-options:SAMEORIGIN header in the response, this blocks the browser from show the map image.
Attachments:
Last edit: 1 month 3 weeks ago by JIANPING.

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Powered by Kunena Forum