Posted on: 08/28/2017 Posted by: Jason Comments: 7

You can copy the code below or download all files necessary here (v2016 and below)

You can copy the code below or download all files necessary here (v2017 and above)

Note: Google now requires credit card information to be on file with your API key

These were originally written by someone else who I would like to credit. I worked off the original and made a new one which could show devices. [Need to get name] I then looked into the Google Maps API further and found a useful function someone had made, markerwithlabel.js. I can not take credit for either of those things, so please send thanks to Gary Little for markerwithlabel.js. markerwithlabel.js is freely and publicly available from here.

Instructions:

  • Download the proper zip file aboveile, and and unzip. Make sure GoogleMaps_Devices.asp or GoogleMaps_Groups.asp [depending on which code you copied] to <Your install directory>IpswitchWhatsUp\HTML\NmConsole\DeviceManagement\DeviceList [For v2017 and up, copy the file to Ipswitch\WhatsUp\HTML\NmConsole]
  • Copy labelwithmarker.js to same directory
  • Make a dashboard with this information –> Columns: 1 –> Width: Max supported by monitor (1280 for example) –> Add Content: Free Form Text/HTML report
  • Menu -> Configure on the Free Form Text/HTML report. Make sure to click ‘Source Edit’ button
  • For device dashboard, copy and paste this:
<iframe src="/NmConsole/DeviceManagement/DeviceList/GoogleMaps_Devices.asp" style="border:0px #FFFFFF none;" name="dash_frame" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="700px" width="100%"></iframe>
  • For the group dashboard, copy and paste this:
<iframe src="/NmConsole/DeviceManagement/DeviceList/GoogleMaps_Groups.asp" style="border:0px #FFFFFF none;" name="dash_frame" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="700px" width="100%"></iframe>
  • To add devices to the devices map: Add a device attribute to the device in WUG using the attribute name ‘LatLong’ with the value being x,y (Latitude,Longitude)
  • To add groups to the group map: Right-click the group and select properties. Update the description with the value x,y (Latitude,Longitude)
  • http://itouchmap.com/latlong.html — I use this site to grab the latitude,longitude information.

7 People reacted on this

  1. I’ve followed your instructions in the ZIP file for 2017 and above and get a 404 error when the iFrame loads. I’ve generated my API key with Google and appended it the links in the ASP page (without ). Any ideas?

    1. How do you get the iFrame to load? I’ve done everything but I believe I’m not linking/setting up the html script correctly in the dashboard as it just shows the script when I access my custom dashboard. (I do not have experience with HTML but I’ve followed the text file’s instructions perfectly, copying the files to the necessary path on my server and of course inserting my Google API key into the two sections in script that reads var sAPIKey = “MYKEY”;)

  2. I figured out the issue… in your text file instructions the ASP page is named incorrectly… at least for the 2017 version. The links should read “/NmConsole/GoogleMaps_Devices_v2017.asp” and “NmConsole/GoogleMaps_Groups_v2017.asp”

  3. This is working great in WUG 2018 SP2. All we did was adjust the zoom, lat, and long and we have what we need. Thank you!

  4. This is awesome!!! If I could add one feature, it would be to have the status of the device displayed at the group level for the devices under that group. For example, If there was a device that went down at a site then the group for the site would display that there is a problem. Right now all I see is a gray question mark.

    1. @George: There are two separate files, one for devices and one for groups. The groups file *should* be displaying status of the group as well, unless it is a dynamic group. Dynamic groups do not store their status in the database, which means it would indeed show the ? (unknown status). It would be possible to modify the queries in the ASP to account for this, but that would certainly take a bit of effort.

Leave a Comment


CAPTCHA Image
Reload Image

This site uses Akismet to reduce spam. Learn how your comment data is processed.