Google Map Widget

One of the eagerly anticipated features added to 9.2 was the addition of an out of the box Google Map Widget.  Well, not technically out of the box, but at least a provided plugin with easy to follow instructions for setting it up.  While the steps seem straight forward, I often see a lot of questions surrounding it.  There’s also a surprise waiting for you if you’re currently enjoying the plugin in 9.2 and haven’t yet upgraded to 9.2.1.

Obtaining the Plugin
The plugin can be found in the C:Program FilesMicroStrategyGISConnectors folder, along with the ESRI connector that shipped with 9.0.2.  In that folder you’ll find two Google Map folders, one for an ASP installation and one for a JSP installation.  Open the folder appropriate for your environment, and copy the folder to your WebASPxplugins folder.

Obtaining a Google API License Key
Here’s the gotcha.  Google provides two options for using their Maps API:

  1. A free to use Standard license key: http://code.google.com/apis/maps/signup.html No longer an option.  This now requires a premier key to be purchased.
  2. A Premier license key that requires you to contact their sales department to obtain a quote: http://www.google.com/enterprise/earthmaps/maps.html
Technically, the biggest difference between the two is the amount of GeoCoding you can do.  This is a Google service that allows you to obtain the location on the map for a text based location search, such as a Zip Code, City, State, etc.  Think of that as when you use the Google Maps website normally.  You can do a limited number of these with the Standard license key, but not enough to support any kind of Analytics.
The MicroStrategy plugin doesn’t support GeoCoding yet anyway, so you have to provide your own pre-GeoCoded Latitude and Longitudes, which will work fine using the Standard license key.  However, upon closer inspection of Google’s License Agreements, usage of Maps in an Intranet Business Intelligence environment requires a Premier license.  It seems that this was an oversight in the original release with 9.2, because 9.2.1 enforces the requirement of a Premier license, and the 9.2 version of the plugin does not work with 9.2.1.
So, if you’re currently enjoying free use of the Google Maps plugin with MicroStrategy 9.2, you may want to add it’s loss or potential costs to your upgrade considerations.
One more quick note, when you’re getting your API key, it asks you to provide the domain that you’ll be using it on.  This domain is cross checked by the key, so make sure that you enter the one you’ll actually be using.  If you’re using an internal domain, like http://svr-loc-1/microstrategy/asp, then register http://svr-loc-1 with the Google Map API, even though that’s your internal machine name.
Configuration
Once you’ve obtained the key, browse to the plugin folder that you’ve copied to your WebASPxplugins folder, and drill down into the WEB-INFxmlconfiggoogle folder.  Edit the googleConfig.xml file and put your key between the <mk> tags.  In the 9.2.1 version of the plugin, you’ll notice the isPremier=”true” flag.  Setting this flag to false or removing it will disable the plugin, which means you’ll get a blank map.  Leaving it true but providing a Standard license key will result in the map loading but then closing, and a message from Google saying that your key isn’t authorized and instructions for upgrading.
Also in this file, you’ll see 3 more GUIDs under the <pjs> tag.  Inside the <pj> tag, put the Project ID that you’ll be using this in.  Create multiple <pj> tag entries to support multiple projects.  In the <at> tags, enter the Attribute GUID for the Latitude and Longitude that you’ll be using for the report.  If they are Attribute Forms instead of separate Attributes, simply put the same GUID for both.
Restart your Web Server and you’re done with the configuration.
Configure the Report
  1. Create a report with Latitude and Longitude on it and whatever metrics you want.  
  2. Make sure that the Row Merged setting is disabled.
  3. Run the report, and under the Tools menu, select “Custom Visualizations“.  If you don’t have that option, you can enable it in the Project Preferences under Project Defaults -> General.  There’s a check box to enable it.
  4. Check the box at the top to Enable Visualizations for this report, and scroll to the bottom under AJAX and choose Google Map (9.2) or Map (9.2.1+).  It was renamed between versions.
  5. Click Visualization Properties and define how your Latitude and Longitude are created, either by separate Attributes or Attribute Forms.
Conclusion
Now you’re finished and this report will load up using the Google Map Widget!

You may also like...

89 Responses

  1. Skippy says:

    Hi there.

    My IServer is a Linux box. I don’t have the WebASPxplugins directory anywhere that I’ve been able to find.

    Is this a WINDOWS-ONLY thing? Or has anyone here done this on a LINUX web server running Tomcat?
    - Thanks,

    Todd

  2. Hi there,

    I would like to add X-Axis on top of the this application. This X-Axis will have the list of locations. When the user clicks on any of the axis, the map will be zoomed in to that particular location and data will be displayed on top of the location. Is this possible with MSTR (in both web and mobile)?

    Example:
    Initially, the X-Axis may contain list of continents. When user clicks on the continent “North America”, the map will be zoomed in to the “North America” and X-Axis will have list of “North America” countries.

  3. B says:

    Bryan,

    I want to visualize a report using google maps. I followed all the steps using a standard API key. The report displays correctly for merely 1 second and then a pop-up message says “Google has disabled use of the Maps API for this application. This site is not authorized to use the Google Maps client ID provided”.
    I read the previous comments and I am aware of the necessity of the premier key but I have two concerns:
    - firstly you mention that it should be fine even for standard key, and I also found other cases on the internet for whom it worked.
    - secondly the map with the corresponding points(from the report) displays for a second and then this message appears.

    Is there any workaround or if I want to use this API i should obtain a premier key?

    Thank you very much for your support,

    Your blog is one of my first sources for mstr,

    Best,

    B.

    • Bryan says:

      The standard key works in 9.2, but not in 9.2.1+. I think the reason you see it flash for a second is that it’s the map itself doing the api check to google. If you were to try to hack it so that it couldn’t call home, my guess is it would still unload itself on a failed check too. In this case, buying a premier key is your only option, unfortunately.

  4. Hi Bryan, we are integrating Google Maps with our Reports and Dashboards, we did setup accordingly as specified by you, but the AJAX option is not popping out to the Right window in Tools->customization, we are using ASP, and we dont have columns of both Lat/Long, and we have around 15 dimension tables and 1 Fact and the schema is snowflake….

    • Bryan says:

      It’s not clear what AJAX option you’re missing. If you don’t see Custom Visualizations as an option, then you have to enable it (and restart) as noted in the post. If you do see it but your map widget isn’t there, then the plugin may not have been properly installed (also documented above).

  5. I also found out that to get the Location, we can use Zipcode of the same, kindly specify,

    Thank You

    • Bryan says:

      The out of the box widget doesn’t support geocoding (converting zip codes to lat/long) out of the box, which is why you have to provide the data directly to do that. Other 3rd party solutions perform it for you (they’re mentioned in these comments), but otherwise there isn’t currently a way to get that otherwise.

  6. Hi Bryan,

    We are trying to bring the “Get Direction” functionality i.e., providing routes between two places in the MSTR widget(same as Google Maps).
    Is it possible to achieve the same using SDK ?

    Please let me know if you have ever tried implementing the same.

    Thanks !

    • Bryan says:

      I’ve implemented my own Google Map widget once (before MicroStrategy released there’s) and adding such features was actually pretty easy. I was using the Flash SDK, which I think Google doesn’t support any more. Either way, it’s just a matter of building your own Google Map widget. I don’t think MicroStrategy opens their code for modification.

    • Hi Bryan,
      Thanks for replying!

      If I am getting it correct I can achieve Routing in MSTR by creating my own Google Map widget and I was planning to refer your earlier post to develop the same (https://resource.microstrategy.com/forum/ReplyListPage.aspx?id=11619)

      In addition to the above can you please confirm that the solution will work on iPhone too because we are trying develop the widget for iPhone and iPads. I am little worried because after iOS 6 the apple products are not supporting Google maps any more and have shifted to Apple maps.

      Thanks for your guidance !

  7. Satya says:

    Hi Bryan,

    I’m trying to implement Google graph on Microstrategy web 9.2.1 and eventually bring it to iphone/ipad as well. I used free license key and my dashboard displays a blank page instead of the map. I’ve looked into forums posts and it has been working in dhtml mode for couple of people. Do I definitely have to get a premier key for this? Also, I don’t see a lot of documentation on this, if possible could you please tell how to create my own google map widget and deploy in microstrategy?

    • Bryan says:

      You definitely have to buy the premier key to get it to work. Deploying your own won’t help, because this is a Google limitation (by requiring you to buy a key for a professional business application), and not a limitation imposed by MicroStrategy.

    • Satya says:

      Thanks for the reply Bryan! So you think there is no way I can make use of Google Map in Microstrategy without a premier license key. Is there any workaround just for prototype purpose atleast?

    • Bryan says:

      MicroStrategy enforces it without a workaround option, so you’re stuck there. Your only option is to implement your own Google Map widget (actually not as hard as it sounds, I did it as my first ever widget with zero flex experience, and I’ve documented a lot of the various processes on this blog). You won’t have fancy features, but you’ll have a map with markers! You could use that as a prototype to see if you like maps.

    • Satya says:

      Oh thatz great! I implemented the area mashup that is available in MSTR for USA Map, but our guys want to see google map by giving latitude/longitude values or zipcodes. Well, I’ll look into your blog for the other processes and would message you in case of any questions. Thanks for all the help Bryan!

  8. John says:

    Hi Brian, I ran across the following from the MicroStrategy GIS Integration Help 9.3.0 doc:

    http://www2.microstrategy.com/producthelp/9.3/GISHelp/topics/Google/Google_Prereqs_DeployingPlugin.htm

    See the instructions under: Home > Integration with Google Maps > Prerequisites > Deploying and Configuring the Map Visualization Plug-in

    It states that you can to the following…. “b.If you are using the standard Google Maps API instead of the Google Maps API Premier product, set the isPremier attribute of the element to “false”. “

    Do you know if this actually gets around the Premier license key issue?

    Thanks.

  9. John says:

    Hi Bryan,

    I was able to get it to work by following the instructions above. We have MSTR v930.

    I can display a Google map on a dashboard with the Map Widget and plot stores on the map by using a “stores” attribute that has latlong.

    The attribute exists in this folder: MicroStrategy Analytics Modules (3 tier)MicroStrategy TutorialPublic ObjectsReportsMicroStrategy Platform CapabilitiesMicroStrategy MobileiPhoneComponent ObjectsStores – MapStore Attributes

    Thanks

    • Bryan says:

      Last I heard, Google deprecated the Standard API key years ago and only has Premier available now. It’s actually up to the software vendor to enforce it for internal applications, so maybe MicroStrategy removed their non-optional enforcing and are leaving it up to you to comply with the license. I haven’t used maps in MicroStrategy since I wrote this post originally, so I’ll take your word for it.

  10. Hi! I’ve been implementing this widget in MSTR 9.3 and took the libery of making kind of a step-by-step tutorial of how I did it. I followed some of Bryan’s steps and took screenshots of the whole process.
    Sorry for the spanish in the MSTR screenshots, hope it helps you!
    Here’s the pdf:
    https://drive.google.com/file/d/0BzizeixyiUoXM0ZYMGl2TjI0ZnM/edit?usp=sharing

  11. Madhu Ashru says:

    Hi. Can i export google map widget to PDF output?
    when i tried that it’s exporting as normal grid data in PDF output.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA Image

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *