I just accomplished something very cool in Datazen and I couldn’t wait to share with everyone! I was working on a POC for a client with Datazen. We were doing some review and the client had an interesting request. We were going to add a drill through to information that would contain an address. The client said “If this could be a link that a phone’s navigation would recognize that would be slick”. I thought to myself “oh that would be very cool” and got a little nerd giddy at the thought of trying to do that.
***
After doing a little searching I found that you can link to a map using the format: http://maps.google.com/?q=term. The “term” portion is where you would update it with your search. So in my case I can put the address. It has flexibility as well so you can do something like this if you would want: http://maps.google.com/?q=statue of liberty. When you use that link it brings up the map below.
Back in Datazen I created a Simple DataGrid that contained the fields I wanted to display including address. I then read the documentation on the Datazen website documentation for custom url drill throughs (http://www.datazen.com/docs/?article=server/drill_throughs_to_other_dashboards_or_custom_urls). The example made me think I had to have a selection be passed to the url. I didn’t want to do that, I just wanted it to pass a field I had displayed in my DataGrid. However when I started playing with it, it showed my fields contained in the DataGrid as well! Sweet! So I created a drill through for my DataGrid. In the expression window I put “http://maps.google.com/?q=” then selected the field (SimpleDataGrid3.Address).
***
When testing this drill through on my iPhone it didn’t work (insert sad trombone music). It would kick me out of DataZen app and go to my home screen but nothing more. It was like it was trying to do something but wasn’t working. I did some more research and found this link (https://developers.google.com/maps/documentation/ios/urlscheme). It refers to the url scheme to launch navigation from apps. So with information from that article I changed the beginning of my link to comgooglemapsurl://maps.google.com/?q=. I test again and it works!
When I clicked the drill through it would open Apple Maps with that address displayed. Cool egh?! It also then reminded me that I hadn’t changed my default to Google maps which is now resolved as well.