Showing posts with label APIs. Show all posts
Showing posts with label APIs. Show all posts
Google Maps Driving Directions gadget - useful for a "Contact Us" page

Google Maps Driving Directions gadget - useful for a "Contact Us" page

Google organizes "the world‘s information and make it universally accessible and useful" but info about some of its own products may be a little difficult to find. If there was a reference to Driving Directions gadget & the Static Maps wizard on the Google Maps API Family page, they could be easily discovered. As these useful utilities exist on orphaned pages and are hard to find, many developers may go on to create their own components.

The Google Driving Directions gadget is a nifty utility that organizations can configure for their websites to show on a map where they are located. More importantly, it optionally lets users type their location & then shows the travel route visually & through textual instructions.



Read More
Say goodbye to Google Translate, Transliterate & ten other APIs

Say goodbye to Google Translate, Transliterate & ten other APIs

About a fortnight ago, Google highlighted on its official blog how "two clever Translate trends caught our eye—perhaps one of them will inspire you to come up with a fun Translate trick of your own.". Folks around the world were making fun remixes

First, some creative folks translated strings of consonants into German to create a new beatboxing tool. The phrase “pv zk bschk” didn’t initially make much sense to us, but a quick listen got us nodding our heads along to the beat.
Now it seems there’s a similar trend in Taiwan: using the spoken output of Google Translate as the vocals for self-composed songs or video spoofs.

A few days ago there was an announcement on the Google Code blog that the Google Translate, Transliterate & ten other APIs will be deprecated. The Google Translate API will be shut off completely on December 1, 2011 and the reason is "substantial economic burden caused by extensive abuse".  So what constitutes "fun Translate tricks" and abuse? Why not just debar developers abusing the API?

An aggrieved developer ranted thus in the comments section of that announcement -
you are supposed to be the smartest guys on the planet and the only solution you can come up is to shut it down? thats a joke, but the joke is on us, the developers.
with this move you just showed us what you really: a company that does not care about developers, you just want to become more like facebook and apple. oh what a great world we live in. more walled gardens. 


Also see - HOW TO monitor performance and availability status of public APIs & websites

Read More
HOW TO monitor performance and availability status of  public APIs & websites

HOW TO monitor performance and availability status of public APIs & websites

If you use Public APIs (like Bing Search, Google Maps APIs) in your applications, it helps to be aware of performance and availability issues that those services may face.

Thankfully, there are some free tools that monitor popular APIs & websites -
Also see:
How LARGE websites manage performance & scalability
Read More

Screen scrape with jQuery, AJAX, JSONP & YQL

Since reading this excellent article about scraping content from a Wikipedia page using Yahoo! Query Language (YQL) as a proxy for cross-domain Ajax, I'm hooked to YQL. YQL helps in circumventing the same-origin policy that prevents a script loaded from one domain from getting or manipulating properties of a document from another domain.  YQL has been around for about 2 years now & last year Yahoo introduced the capability to execute the tables of data built through YQL using JavaScript.

Ajax, jQuery, JSONP (JSON with Padding) & YQL make a heady combination - check Christian Heilmann's code samples.

Some facts about YQL from around the Web (work in progress) -
* YQL is a hosted web service that can scrape HTML for you. It also runs the HTML through HTML Tidy and caches it for you.
* It only returns the body content of the HTML - so no styling (other than inline styles) will get through.
* ...it treats the info on the web as a virtual table that developers can manipulate in a standardized way, regardless of the API that data came from.
* YQL understands and supports data sources like RSS, Atom, JSON, XML, CSV, HTML, Flickr, Yahoo! Finance, Weather, and so on.
* ...makes client-side mashups possible without using server-side proxies.
* Usage Limits:
Per application limit (identified by your Access Key): 100,000 calls per day
Per IP limits: /v1/public/*: 1,000 calls per hour; /v1/yql/*: 10,000 calls per hour


Also see:
HOW TO prevent screen scraping 
Google Spreadsheets functions for scraping external data
77
Read More
Free Programmable & Searchable Dictionaries

Free Programmable & Searchable Dictionaries

If you had to build a custom spell check functionality or something similar for your application, there are thankfully free Dictionaries in text and database format.
  1. FOLDOC is a searchable dictionary available as a text file and offered under the GNU Free Documentation License. You can use a database tool like SSIS to convert the dictionary into a database table & validate your words against it.
  2. WordNet from Princeton University is unencumbered for commercial use. ObjectGraph has a SQL Server database version of it.
Read More
Web Platforms

Web Platforms

Web Platform refers to an API or SDK provided to external developers by a product to build applications on.

Top 10 Web Platforms of 2008 is the tenth in the "Top 10" article series on web based products compiled by ReadWriteWeb -
  1. iPhone SDK
  2. OpenSocial, an open API framework from Google for social networks and websites
  3. Adobe AIR (Adobe Integrated Runtime)
  4. Twitter API
  5. Facebook Platform
  6. Android
  7. Amazon Web Services
  8. Live Mesh
  9. Fire Eagle
  10. Mozilla Weave
Also see: Web APIs galore
Read More

HOW TO customize Search Engine results programmatically

All the popular search engines offer APIs to programmatically access results. The Live Search API 2.0 reportedly serves more than 3 billion queries/month.

Google offers specialized searches like Local Search and Blog Search that narrow down the scope of results. These specific category search results can also be fetched through code as this WebMonkey article explains.

Trivia: WebMonkey has a funny way of representing the skill level required for understanding the article -
Read More
HOW TO implement a Store Locator for a website?

HOW TO implement a Store Locator for a website?

The folks at Wotton.org have put up a simple online app that makes it easy to put up a Store Locator for your website in no time with Google Maps. The advantage of showing it in an online map is that it can utilize the Driving directions feature that can be useful to visitors of that website.

The app provides a simplified UI to build a KML file. It takes coordinates of the locations, with any titles and description that you may want to add. A KML (Keyhole Markup Language) file is basically a standardized XML schema file that can hold geographic coordinates & related content.

You have to drop this KML file in the same directory as the web page in which you want to show the map. A template HTML file that contains the Javascript to merge the KML/XML file info on the map, is also provided.

Google Maps runs only when you have an API key registered for your website. So you need to sign up for it (for free).

Each API key is uniquely mapped to the directory (URL) where the web page with the embedded map is used. So you cannot use somebody else's API key or use your own on a different domain than what you have registered with. If you try it, it throws this warning - The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://code.google.com/apis/maps/

Thanks Jeffrey for sharing this tip.

Related link -
Road/Street maps of Indian cities on the Web
Read More
Road maps of Indian cities on the Web

Road maps of Indian cities on the Web

Creating road maps for India is a tough job. It's a bustling country full of idiosyncrasies. Not just street names even city names can change overnight based on popular or political sentiments. In the past decade, names of four major cities Bombay, Calcutta, Madras and Bangalore have been changed to Mumbai, Kolkota, Chennai and Benguluru respectively.

However, Road maps are essential for India's teeming millions and luckily there are quite a few free mapping services for India on the Web that do a fair job, notably:
Live Maps India has recently added a lot of detail including Street Maps for 9 important Indian cities (Delhi, Mumbai, Chennai, Kolkata, Bengaluru, Hyderabad, Pune, Ahmedabad, and Jaipur), Location Search, Business Search and driving directions. The driving directions include detailed textual map directions like in Yahoo Maps India but unlike Google Maps. It supports fuzzy search, the keywords you type need not be precisely spelt. Although not very comprehensive (I could not locate Microsoft's Hyderabad office, Hyderabad Central mall and Maitrivanam - the birth place of Hyderbad's IT story, on the Hyderabad map) it is definitely promising.

Google Maps, Yahoo Maps and Live Maps/Virtual Earth provide APIs to programmatically fetch maps & derive practical benefit from geographical info. I have found Live Maps/Virtual Earth the easiest to work with.

As per the Windows Live Web Services Terms of Use, Sites or Web applications with fewer than one million unique users pay no fees and the Virtual Earth service is free up to 3 million map tiles/month.

All the above three services support interesting keyboard shortcuts. You can use Arrow keys to Pan , "+" to zoom in, "-" to zoom out. In Live Maps, you can use Ctrl and Arrow keys to pan faster.

I know it's going to be long but I look forward to the day when Traffic tracking can be done through these online maps.

Related links -
HOW TO visually find the latitude & longitude of any town/city using Virtual Earth Map Control 6
Read More