Inductive Automation
News Room

News / December 01, 2009

Did You Know? You Can Embed Google Maps Into Your FactoryPMI Project

Leverage the power of Google Maps by bringing it into your SCADA/HMI project. Using the Image Component, you can easily bind the image path to a Google Maps API URL. Then you can bind to other components, using property binding expressions, to dynamically alter the map.

You can display a map and allow users to interact with it by typing in locations, zooming in and out, etc. You might want to put buttons or images on top of the map that users can click on, or mouse over, to display data or perhaps open another screen.

Here's how you do it
We've done most of the hard work for you so you can start off with a pre-developed screen and simply modify it.

Step 1: Go to http://code.google.com/apis/maps/signup.html and sign up for a Google Maps API Key. You'll need this later.

Step 2: Go to https://files.inductiveautomation.com/extras/GoogleMapsStaticAPI.fwin and click on File/Save As. Save as GoogleMapsStaticAPI.fwin

Step 3: Open your FactoryPMI Designer, right click in the "Project Browser" panel and choose "Import Window." Find the GoogleMapsStaticAPI.fwin file you saved in step 2.

Step 4: Open the GoogleMapsStaticAPI window, select preview mode, and type in your Google Maps API Key.

You can type in your search keys (address), change the map type, zoom in and out using the slider, and change the image size. Go ahead and play around with the window and customize it to suit your needs. Below is an example of what you should see when you are finished: