"&" is mainly needed here to specify each portion of string we are passing.
Here is some information I found online
I. Create the URLs
1. First, notice that the data file contains Latitude (“LAT”) & Longitude (“LON”) for each bridge.
2. A Google Maps search for a particular Latitude & Longitude (say, 48.445781 and -122.341108) yields a link url like this:
3. The url can be simplified a little bit as follows:
4. Breaking down the elements of the url, we can see that after the latitude & longitude, there are three parameters in the url:
- “q=48.445781,-122.341108″ – these are your coordinates. Note that if you have an address field instead of Lat/Long, you can put an address after “q=” as well
- &z=17 – this specifies the zoom level. Higher numbers zoom in, lower numbers zoom out
- &t=h – this specifies the type of map. (t=m is a map, t=h is a satellite view)
- &output=svembed – this is a key parameter that makes sure the website you embed in your viz doesn’t include the entire site – just the map itself
But i think this is before the Google Upgrades their Maps API .
Dont know how it works with existing API
Being that you are using the api key, this first parameter has a ? which is normal URL syntax. You should try adding a "&" in front of the second parameter which is q.
It didn't work that way either. Can you modify my existing URL and send it to me. if possible.
what you originally had:
what I changed it to, added a % before the q
I think the entire URL string needs to be shown here so the syntax can be checked. In coding it's easy to miss something that a fresh set of eyes could pick up on.
Jeff's syntax looks correct (the use of ? and &). I think the issue is that "MyKey" is not viewed as a variable in the URL, it is a literal just like the lat coordinate i.e. 37.758175. The URL Action needs to know that "MyKey" should be replaced with the value it contains. I'm no expert with Actions but I know that Tableau evaluates items between the symbols < > as Tableau fields, thus I think the URL should look something simular to this:
Tried the way you asked , still it doesn't seem to work
This is the entire string. If any comments let me know please.
Hey Jeff ,.
Thanks for the reply but seems like its not working .
This is what I am using currently. Tried the key with and without <> brackets. No luck.
I don't quite understand, is the <MyKey> static or is it supposed to be fed by a Tableau calc? And what happens when you execute the query outside of Tableau, does it work?
My key is a static value therefore it makes no sense to put it inside <>. It is the unique key generated by google to use their Maps API . This is the recent change google has made if you want to use their maps API.
Please refer this for clarity.
Let me know if you have any more questions.
so what do you see when filling in the key and running it outside of tableau? do you get an error or do you get xml or something else? also, what is the full url that you are passing? what you sent last time had a ... on the end.
From what I've read here
you won't be able to use Java Script. JSON and XML won't return a map, either.
You can use static maps
I generated an API key and was able to make one, that is, I created a workbook Action that displayed a new browser window with a Google map in it.
I did notice that I did not have to use the "&key=" parameter, just the "&" followed by the key as the last item in the HTTPS line. If I specifically used the "key" parameter I got an error.
Can you please share the string which you were passing in the filter action.