A mashup web application has three parts:
- A Web page that provides a new service using its own data and data from other sources (from additional content providers)
- An additional content provider that makes data available across the Web through an API and using different Web protocols
- The user of the mashup, who often uses a Web browser to display the Web page containing the mashup
It all started with a man named Paul Rademacher who took Google maps (which launched in 2005) to the next level when he created http://www.housingmaps.com, the very first Google maps mashup. To make his hunt for a new house easier, he essentially hacked Google maps, modifying the application to overlay information on houses for sale or rent from Craigslist.com, a popular site for classified advertisements. Google employees were impressed, writing on a company Web page that Rademacher's site"blew our minds right off our shoulders." Since then, online mapping applications have become far more sophisticated. The major players in online mapping have all embraced mashups and now offer APIs (application programming interfaces) that allow developers to integrate online maps with their own websites and data.
Google Maps APIs
According to Programmable Web, mapping mashups represent about 50% of total developed (submitted) mashups, and Google presents about 46% of those.
The Common Features of the Mapping APIs
An Example: Calculating the Prayer Times, Distance and Direction to Makkah based on Google Maps APIs
In order to calculate prayer times, three factors must be considered: date, location and methods of calculation. Figure 3 shows the main parameters of the prayer times equation.
The application uses Google Maps to retrieve the longitude and latitude of any selected point on the map, and sends these coordinates to the www.geonames.org Web service to retrieve the basic data of the selected location (location data, time zone data, weather data and elevation data), as shown in figure 4. The location coordinates (longitude and latitude from Google Maps), plus time zone and country name (geonames.org) are used as parameters in the prayer times equations.
Methods and parameters of calculating the prayer times:
1. Muslims have five prayer times each day (Fajr - Dohur - Aser - Maghrab - Isha); the time the sun rises also needs to be calculated.
2. Prayer times are calculated based on (four Muslims Mazhabs): Almazhab AlSHAFI-Al Malki- AlHanbali. Almazhab AlHanafi not considered.
3. The world is classified into five regions in the equations:
4. Prayer times equations are calculated based on Astronomical Algorithms by Jean Meeus.
- Gulf Countries (Saudi Arabia-Qatar-Kuwait-UAE-Bahrain-Oman-Yemen) are based on OM-ALQURA (Makkah Almokarama) calendar.
- USA and Canada are based on Islamic Union of North America.
- Egypt is based on Egyptian General Survey Authority.
- Pakistan is based on Islamic University of Science Karachi.
- The other countries are based on Muslim World League.
For example, to calculate the Fajr prayer time, we use the following equation:
TF = ACOS ((SIN(-18)-SIN(ASIN(SIN(23.439-0.0000004*D)*SIN(L +1.915*SIN(M)+0.02*SIN(2*M)))*SIN(Lat))/(COS(ASIN(SIN(23.439-0.0000004*D)
D = ((367*Y)-(INT((7/4)*(Y+INT((M+9)/12))))+INT(275*(M/9))+d-730531.5)
M = 357.528+0.9856003*D
5. Distance and direction to Makkah Almokarama are calculated based on Haversine formula.
The formula states: For two points on a sphere (of radius R) with latitudes φ1 and φ2, latitude separation Δφ = φ1 − φ2, and longitude separation Δλ, where angles are in radians, the distance d between the two points (along a great circle of the sphere; see spherical distance) is related to their locations by the formula:
Google API Documentation
Working with Google maps
Articles and Tutorials on Google maps
Google Maps Mania
Google Mashup Editor, Google
Programmable Web (Keeping you up to date with mashups)