Pass data item/query item into Hyperlink. How to get Google maps links at Cognos.

For this example I am using google maps.
Google maps URL –
https://www.google.com/maps/search/?api=1&query=58.698017,-152.522067

Create 2 query items with latitude and longitude. Say [Query Item Latitude], [Query Item Longitude]
create a new data item say – [Query Item_google maps url] with
https://www.google.com/maps/search/?api=1&query= ‘ ||cast([Query Item Latitude] as varchar(10))||’,’|| cast([Query Item Longitude] as varchar(10))

at report studio drag hyperlink to your list report.
Select Hyperlink and change properties as follows
Source type – Data Item value
Data Item Value – [Query Item_google maps url]
Googlemaps

Run the report. You should be able to get to google maps from the hyperlink.

Another google map URL you can play with –
https://maps.google.com/?hl=en&ll={LATITUDE},{LONGITUDE}&t=m&z=19&vpsrc=6&layer=c&cbll={LATITUDE},{LONGITUDE}&cbp=12,15.61,,0,0

Here is the URL API guide from google: https://developers.google.com/maps/documentation/urls/guide

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s