Wednesday, 13 January 2010

A note about Google Maps

Implementation
Like many other Google web applications, Google Maps uses JavaScript extensively. As the user drags the map, the grid squares are downloaded from the server and inserted into the page. When a user searches for a business, the results are downloaded in the background for insertion into the side panel and map; the page is not reloaded. Locations are drawn dynamically by positioning a red pin (composed of several partially-transparent PNGs) on top of the map images.

A hidden IFrame with form submission is used because it preserves browser history. The site also uses JSON for data transfer rather than XML, for performance reasons. These techniques both fall under the broad Ajax umbrella.

[edit] Extensibility and customization
As Google Maps is coded almost entirely in JavaScript and XML, some end users have reverse-engineered the tool and produced client-side scripts and server-side hooks which allowed a user or website to introduce expanded or customized features into the Google Maps interface.

Using the core engine and the map/satellite images hosted by Google, such tools can introduce custom location icons, location coordinates and metadata, and even custom map image sources into the Google Maps interface. The script-insertion tool Greasemonkey provides a large number of client-side scripts to customize Google Maps data.

Combinations with photo sharing websites, such as Flickr, are used to create "memory maps". Using copies of the Keyhole satellite photos, users have taken advantage of image annotation features to provide personal histories and information regarding particular points of the area.

[edit] Google Maps API
Google created the Google Maps API to allow developers to integrate Google Maps into their websites with their own data points. It is a free service, and currently does not contain ads, but Google states in their terms of use that they reserve the right to display ads in the future.[10]

By using the Google Maps API, it is possible to embed the full Google Maps site into an external website. Developers are required to request an API key,[11] which is bound to the website and directory entered when creating the key. The Google Maps API key is no longer required for API version 3. Creating a customized map interface requires adding the Google JavaScript code to a page, and then using Javascript functions to add points to the map.

When the API first launched, it lacked the ability to geocode addresses, requiring users to manually add points in (latitude, longitude) format. This feature has since been added for premier.

At the same time as the release of the Google Maps API, Yahoo! released its own Maps API.[12] The releases coincided with the O'Reilly Web 2.0 Conference. Yahoo! Maps, which lacks international support, included a geocoder in the first release.

As of October 2006[update], the implementation of Google Gadgets' Google Maps is simpler, requiring only one line of script, but it is not as customizable as the full API.

In 2006, Yahoo! began a campaign to upgrade its maps to compete better with Google and other online map companies. Several of the maps used in a survey were similar to Google maps.

Google Maps actively promotes the commercial use of its API. Some of its first large-scale adopters were real estate mash-up sites. Google performed a case study[13] about Nestoria, a property search engine in the UK and Spain.

No comments:

Post a Comment