Linking to Google Maps from Desktop App - http

I want to provide a button in my commercial Windows Forms desktop application which just opens a link to maps.google.com (Google Maps) in a webbrowser control or in the user's default Web Browser with the start and destination address populated. I just String.Format the parameters into a URL, I end up with a URL like this:
http://maps.google.com/maps?saddr=SUNBURY+Victoria+Australia&daddr=MORNINGTON+Victoria+Australia
and then open that URL with the webbrowser control, or associated app calling Process.Start and passing in the URL, like this:
Dim URL as String = "http://maps.google.com/maps?saddr=SUNBURY+Victoria+Australia&daddr=MORNINGTON+Victoria+Australia"
If _useWebBrowser then
webbrowser1.Navigate(URL)
Else
Dim sInfo As New ProcessStartInfo(URL)
Process.Start(sInfo)
End If
I am not using the API here (am I?), just linking to the Google's maps site with a URL with a start and end address, but I am now worried this might violate terms of service of some kind. I can't find any good definition of this anywhere.
The closest I can find, on the Google "Permissions" page for Maps, everything else relates to use of the APIs:
http://www.google.com.au/permissions/geoguidelines.html
Feel free to use a hyperlink on your website or within your application to send users to Google Maps — we appreciate it! Our one request is that you do not use the Google or Google Maps logos as the hyperlink. Please just use text or another image of your choice.
Can I legally create a URL programmatically, and call that URL in a webbrowser control, IE, Chrome, etc?
I am completely confused.

So you just have a link that opens the Google Maps website in a web browser (which includes a webbrowser control)? And you're not using a Google logo for the link? That's fine! As they said, they appreciate it. :-)
Generating the link dynamically doesn't change that. And no, you're not using the Maps API, so the API terms of service don't apply.

Related

Google maps API directions service redirects to JSON info, but how do I get it to open map app in phone?

I'm new to Google Map API. The following javascript opens a new page with the JSON data. The google documentation gives the following URL example, (I added the window.open javascript part). But there isn't a complete example anywhere that I found.
I'm trying to open this from my asp.net website, into open the google maps app on a phone to the places indicated. Of course, the places will be put in programmically.
function myNavFunc4(){
window.open("https://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los+Angeles,CA&waypoints=Joplin,MO|Oklahoma+City,OK&key=My_KEY");
}
In order to launch Google Maps app from your website you can use the Google Maps URLs. This API was designed for this purpose.
Instead of using Directions API web service endpoint in your script you should create a Google Maps URL for directions.
E.g.
function myNavFunc4(){
window.open("https://www.google.com/maps/dir/?api=1&origin=Chicago,IL&destination=Los+Angeles,CA&waypoints=Joplin,MO|Oklahoma+City,OK");
}
For further details please have a look at Google Maps URLs documentation.
Enjoy.

How to track a PDF view (not click) on my website using Google Tag Manager

How can I track that someone visited the following URL of my website http://www.website.com/mypdf.pdf.
I tried using a Page View trigger on a Page View tag. I'm completely new at Google Analytics so not sure how to proceed. Most people are going to be going to that pdf directly via URL, as there is no link to it on my website, but I really want to be able to track how many people view it.
Thanks in advance!
You cannot track PDF views with the help of GTM. GTM for web is a javascript injector, and one cannot inject Javascript into a PDF document from the browser.
One way to circumvent this is to have a gateway page, i.e. have the click go to a HTML page that counts the view before redirecting to the document in question (naturally you could use GTM in that page). Since people go directly to the PDF URL this would require a bit of scripting - you would have to redirect all PDF links to your gateway page via a server directive, count the view and then have the page load the respective document.
Another even more roundabout way would be to parse your server log files and send PDF requests to GA via the measurement protocol (actually many servers allow to have log writes redirected to another script, so you could do this in realtime). I would not really recommend that approach - it's technologically interesting, but probably more effort than it is worth.
The short version is, if you are not comfortable fiddling a little with your server setup you will probably not be able to track pdf views. GTM does not work on PDF files.
Facing same issue…
My solution was to use url shortener (like bitly.com) which includes opening statistics.
Not the perfect solution but it works for direct pdf access from external source (outside your site).

How would you go about writing a custom script that grabs the Adobe or Google Analytics image request?

If I wanted to build a scraper that pings each URL on a site and stores the adobe (or Google) image request, how would I go about this? I.e. I just want something that grabs all the parameters in the URL posted to Adobe in a csv or something similar. I'm familiar with how to build simple web scrapers, but how do I grab the URL I see in for example Fiddler that contains all the variables being sent to the Analytics solution?
If I could do this I could run a script that lists all URLs with the corresponding tracking events that are being fired and it would make QAing much more manageable.
You should be able to query the DOM for the image object created by the tag request. I am more familiar with the IBM Digital Analytics (Coremetrics) platform and you can find the tag requests using accessing the following array document.cmTagCtl.cTI in the Web Console on a Coremetrics tagged page. I used this method when building a Selenium WebDriver test case and wanted to test for the analytics tags.
I don't have the equivalent for Adobe or GA at the moment since it depends in the library implementation am trying the do the same as you for GA.
Cheers,
Jamie

Share my google drive data using a website in asp.net

I have some files and folders in my Google Drive.And I have a website.
I want to show my Google drive content in one page of my website.Any body can view the those data.
I tried this since morning.Using javascript I did that.But in that case it only show the data when I login using that Google account.But from other machine or with out sign in using my account it's not show any data.I checked from firebug it's giving a error like login required.
Can any one help me to solve the problem.I will like to do that using asp.net.
Thanks in advance.
Share a folder with public Internet, use an API key to query the files under that folder with an API key.
gapi.client.setApiKey(API_KEY_HERE);
gapi.client.drive.files.get({
'q': '"<publicFoldersId>" in parents'
}).execute(callback);
Obtain an API key from API Console by generating a key for browsers [1].
Note: I'm using the JavaScript client library, available on [2].
[1] https://developers.google.com/console/help/#generatingdevkeys
[2] https://developers.google.com/api-client-library/javascript/

Flex application bookmarking problem/"#" at end of url

I work in an area where the business users heavily depend on bookmarks to access their work-related web applications. Our standard browser is Internet Explorer v6. We have a new Flex application - when you add the site to Internet Explorer Favorites, then later try to access the site with the Favorites link, we get the following error message: "internet explorer cannot open the internet site http://our url. Operation aborted". If we then bring up the properties for the link and remove the trailing "#' from the url, the link works.
What is this trailing "#", and can it be removed? Is there a way to have Internet Explorer bookmarking to work for this site (other than manually editing the bookmark)? The problem doesn't occur in Firefox (but not everyone has access to that browser).
The trailing # is used to provide information to your client-side framework. It was originally meant to provide the ability to link to anchor points in an HTML document. It has been "hijacked" by JavaScript frameworks to provide state information to Flash and Flex applications.
The primary benefit of using # to navigate is that the browser doesn't navigate off the current page - meaning you only need to load your framework once. Traditional URLs would force an entire page reload.
Most likely you can't remove it. You should be able to provide a means for a secondary URL scheme that encodes what you need in a query string (?foobar=1).
You will need to configure server-side processing to either redirect the user to the hash URL or load the necessary information via a JavaScript hook to your Flex framework.
You might also look into the new Google Chrome plugin for IE.
You can turn this off in the compiler parameters in Flex Builder. Go into the project settings, then in "Flex Compiler" uncheck the box that says "Enable integration with browser navigation".

Resources