Embed static Web App item maps using the Google Static Maps API

Updated on 10-July-2015 at 12:08 PM

 Using the Google Static Maps API , you can easily implement static maps in the detailed view of your Web App items - without having to generate an API key.

To embed a static map, simply insert the following code in the "Detail Layout" of your Web App while in HTML mode.

<div id="google-static-map">
<div><img src="http://maps.google.com/maps/api/staticmap?size=400x400&amp;maptype=roadmap\&amp;markers=size:mid|color:red&lt;/a&gt;&lt;span&gt;|{tag_address1} {tag_addresscity} {tag_addressstate} {tag_addresscountry}&amp;sensor=false" alt="gmap" id="gmap" /></div>
<span onclick="javascript:document.getElementById('gmap').src='http://maps.google.com/maps/api/staticmap?size=400x400&amp;maptype=roadmap\&amp;markers=size:mid|color:red&lt;/a&gt;&lt;span&gt;|{tag_address1}+{tag_addresscity}+{tag_addressstate}+{tag_addresscountry}&amp;sensor=false';">Map</span> |
<span onclick="javascript:document.getElementById('gmap').src='http://maps.google.com/maps/api/staticmap?size=400x400&amp;maptype=hybrid\&amp;markers=size:mid|color:red&lt;/a&gt;&lt;span&gt;|{tag_address1}+{tag_addresscity}+{tag_addressstate}+{tag_addresscountry}&amp;sensor=false';">Satellite</span>

Now ensure that you enable the maps feature by selecting your Web app and then clicking Edit Web App Settings:


Then selecting the Allow proximity search box and then clicking Save.


The last step is to add the addresses to your Web App items by selecting a web app item and expanding the Item Address section:


Tip: you can also add the web app item addresses by doing a web app import.