By Rich Gibson, Schuyler Erle
Price: $29.99 USD
£20.99 GBP
Cover | Table of Contents
http://maps.google.com/, and you'll get the view shown in Figure 1-1. If you want maps of the United Kingdom, try http://maps.google.co.uk/, and you'll get the view in Figure 1-2. A similar map exists for Japan at http://maps.google.co.jp/.
http://maps.google.com/
http://maps.google.co.uk/
http://maps.google.com/, and you'll get the view shown in Figure 1-1. If you want maps of the United Kingdom, try http://maps.google.co.uk/, and you'll get the view in Figure 1-2. A similar map exists for Japan at http://maps.google.co.jp/.
http://maps.google.com/
http://maps.google.co.uk/
http://www.google.com/corporate/tenthings.html that "you can make money without doing evil." However, more of the interest in Google Maps may stem from other ideas stated on the philosophy page—for example, "The interface is clear and simple" and "Pages load instantly."http://maps.google.com"
[Hack #1]
, standard addresses work, but so does entering a city and state, or a ZIP Code alone. Street intersections also work, as long as you add a city and state.38, -122, or 38 N, 122 W. Most modern people don't relate to latitude and longitude directly, but it is a compact and precise way to mark a location.
cheese near Petaluma, CA and get a map like Figure 1-10.
http://www.marinfrenchcheese.com/), you could click on the link on the right side in the list of results, zoom in a bit, and flip to satellite view to get the view in Figure 1-11.1005 Gravenstein Hwy N, Sebastopol, CA 95472 to SFO
SFO to OAK. This pulls up the driving directions shown in Figure 1-14.
W 88th St and Broadway, NY, NY to W 92nd St and Central Park West, NY, NY. It also includes a destination mini-map.
http://maps.google.com/maps?q=W+88th+St+and+Broadway,+ny,+ny+ to+W+92nd+St+and+Central+Park+West,+ny,+ny&ll=40.789110,-73.966550&spn =0.007782,0.013467&hl=en
Key West, Fl and then click on "Link to this page."http://maps.google.com/maps?q=Key+West,+Fl&hl=en
http://maps.google.com part should be familiar. This is the basic Google Maps address. Next, /maps is a program running on Google's servers that generates maps. Web programs can accept parameters. The syntax for parameters is to start with a question mark and then put the name of a parameter, an equal sign, and the value of the parameter. If you need a second (or third, or more) parameter, you put an ampersand between the first value and the second parameter's name. So ?q=Key+West,+Fl&hl=en means there is a parameter named q with the value Key+West,+Fl and a parameter named hl with the value en.hl is the language for the results, and q is the query, or location that you are searching for. If you speak French, replace the en with fr, and so on. If you leave off the hl parameter, Google Maps will try to display things in whatever language the user's web browser prefers.q or query parameter can be any of the things that are discussed in "Find Yourself (and Others) on Google Maps"
[Hack #2]
. For example, here is the URL to a map for latitude 38 degrees north, longitude 122 degrees west:http://maps.google.com/maps?q=38,-122&hl=en?
http://mappinghacks.com/google/sample_data.xls.
<li><a href="http://maps.google.com/maps?q=1005+Gravenstein+Hwy +N.,Sebastopol,CA,95472+(O'Reilly)&hl=en"> O'Reilly & Associates</a></li>
li tag will put each line in an HTML bulleted list. You will be able to click on the name and pop up a map centered on the address that goes with that person or company.
=CONCATENATE(B4,",",C4,",",D4,",",E4,"(",A4,")")
=B4 & "," & C4 & "," & D4 & "," & E4 & "(" & A4 & ")"
1005 Gravenstein Hwy N.,Sebastopol,CA,95472 (O'Reilly)
http://del.icio.us/?http://del.icio.us/doc/about, Joshua Schacter created del.icio.us as a:…social bookmarks manager. It allows you to easily add sites you like to your personal collection of links, to categorize those sites with keywords, and to share your collection not only between your own browsers and machines, but also with others.
http://del.icio.us/register and picking a username and password, you can use the service to bookmark your own links.
http://del.icio.us/tag/gmaps. Or to see the sites tagged with gmap, try http://del.icio.us/tag/gmap. Other people use googlemaps and google_maps, so you can get to those with http://del.icio.us/tag/googlemaps and http://del.icio.us/tag/google_maps.http://maps.google.com is awesome, with an easy user interface, one-box searching, and integrated satellite imagery. But it gets better! The Google Maps team has made it possible to include Google Maps with almost all of its great features onto your own web pages. They have done this by providing an open Application Program Interface, or API.Target=_new to open a new browser window.http://mapserver.gis.umn.edu) is very powerful, allowing you to do things that Google Maps cannot yet equal, but there is a rather steep learning cliff. There are also industry standards for web mapping promulgated by the Open Geospatial Consortium (OGC) at http://www.opengeospatial.org.http://openlayers.org/ to access public data sources and put free maps on your page.http://maps.google.com is awesome, with an easy user interface, one-box searching, and integrated satellite imagery. But it gets better! The Google Maps team has made it possible to include Google Maps with almost all of its great features onto your own web pages. They have done this by providing an open Application Program Interface, or API.Target=_new to open a new browser window.http://mapserver.gis.umn.edu) is very powerful, allowing you to do things that Google Maps cannot yet equal, but there is a rather steep learning cliff. There are also industry standards for web mapping promulgated by the Open Geospatial Consortium (OGC) at http://www.opengeospatial.org.http://openlayers.org/ to access public data sources and put free maps on your page.http://geocoder.us/, is a free U.S. address geocoder. You can go to the web site and get the latitude and longitude for a U.S. street address. You can also use a web service interface to get the latitude and longitude automatically for a group of addresses
[Hack #62]
. You can geocode using Google Maps by scraping their search results, but it's not a part of the official API, and doing so violates Google's terms and conditions of service. By contrast, the Geocoder.us site is based on free data without limited terms of service for non-commercial use.http://www.naffis.com/maphacks/latandlon.html you can click on a map and have the corresponding latitude and longitude displayed in a Google Maps info box.
http://mappinghacks.com/projects/gmaps/click.html there is a simplified example of updating a form from the coordinates of a click on a map.<form> Latitude: <input type="text" value="38.4094" id="click_lat" onclick="this.blur()"> Longitude: <input type="text" value="-122.8290" id="click_long" onclick="this.blur()"> </form>
centerAndZoom( ) now comes from these form elements. This code defaults to starting at 38.4094 N, 122.8290 W. Change those values to change the initial focus of the map. The important change to the script is the addition of a GEvent.addListener. This code and the above form can be pasted into the body of your HTML page. Change the developer's key and you can capture clicks on a map:
<script src=
"http://maps.google.com/maps?file=api&v=1&key=replacewithyourkey"
type="text/javascript">
</script>
<div id="map" style="width: 400px; height: 300px"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());
// center and zoom to the lat/long in the form
map.centerAndZoom(new GPoint(
document.getElementById('click_long').value,
document.getElementById('click_lat').value), 3);
GEvent.addListener(map, 'click',
function(overlay, point) {
if (point) {
document.getElementById('click_lat').value = point.y;
document.getElementById('click_long').value = point.x;
}
}
);
//]]>
</script>
http://www.sueandpaul.com/gmapPedometer/ shown in Figure 2-6 estimates cumulative distance—and even includes a calorie counter.
if (navigator.appName == 'Microsoft Internet Explorer'){
document.ondblclick = handleDblClick;
bIsIE = true;
} else {
window.ondblclick = handleDblClick;
bIsIE = false;
}
ondblclick events? It is a difference in how they implement the Document Object Model. Internet Explorer handles double-clicks at the document level, hence document.ondblclick and everyone else (well, everyone else according to this code) uses the window object, so window.ondblclick. In both cases when there is a double-click the variable bDoubleClickHappenedhttp://mappinghacks.com/projects/gmaps/clicktoroute.html. You click on the map to create a continuous track. An example is shown in Figure 2-9.
38.4047068183193, -122.84743666648865 38.4041771393969, -122.84764051437378 38.403941725296505, -122.84796237945557
<?xml version="1.0"?> <gpx> <trk><name>Google Maps Hacks is Good</name> <trkseg> <trkpt lat="38.41324840580697" lon="-122.84113883972168"></trkpt> <trkpt lat="38.402688973080245" lon="-122.82877922058105"></trkpt> <trkpt lat="38.4049085997449" lon="-122.84637451171875"></trkpt> </trkseg> </trk> </gpx>
gpsbabel -r -i gpx -f route.gpx \ -x simplify,count=30 -o gpx \ -F shorter_route.gpx
http://www.vestaldesign.com/maps/starwars.html.
http://www.gimp.org/.http://igargoyle.com/slideshow.html.
http://boneill.ninjagrapefruit.com/wp-content/bbc/newmaps/ you can see the locations associated with the last 12 hours of BBC news, as shown in Figure 3-1. As with most cartographic efforts, there is the nearly inevitable, but still regrettable, focus on just one place—so the last 12 hours of BBC news will generally be more interesting if you prefer news of the British Isles.http://backstage.bbc.co.uk/ for data and ideas so that you can "build what you want using BBC content." This is the heart of the Web 2.0 concept—the idea that open APIs and open formats allow us to make more use of and draw richer connections between the vast amounts of information that are already out there on the Internet.
http://www.guardian.co.uk/online/story/0,,1522351,00.html.http://www.chicagocrime.org/), one of the original Google Maps hacks, is a freely browsable database of crimes reported in Chicago. It combines data that was screen scraped from the Chicago Police Department's Web site (http://12.17.79.6/) with Google Maps, enabling many new ways for Chicago residents to keep tabs on their neighborhoods and explore crimes reported throughout their city. The site lets you browse crime reports in many ways: crime type, street name, date, police district/beat, ZIP Code, city ward, and generic "location" (e.g., bowling alley, bar, gas station). Figure 3-3 sh