Chapter 12: Point Mashups with Google Maps
From Mapping in the Cloud by Michael Peterson
All Google Maps API examples here use a key that is assigned to a specific server. You may need to acquire your own key. If the Google Map examples below don't work once you upload them to your server, you will need to get your own key from Google. As of July 2018, the Google key requires that you enter a credit card. The first $200 of usage is free. This equates to about 28,000 maps a month, more than most developers would need.
- 12.02 - Icons: Change the icon by referencing a different icon in the Markers folder. Icons. Change map size and location.
- 12_02b_Markers_Legend: Change the location and icons. Increase the size of the map.
- 12.03 - Multiple icons in single file: Change the icon to a recycle symbol, and change the center and size of the map.
- 12.04 - Random markers: Change the location so that the border between Nebraska and Iowa is roughly in the middle of the box. To make the box, coordinates need to be defined for the southwest (slat, wlong) and northeast corners (nlat, elong). Change the size of the map. Increase the number of markers to a value between 10 and 99.
- 12_04b_Random_geo: Change the map type (ROADMAP, SATELLITE) and the size of map.
- 12.05 - Points and infowindows in Arrays: Change the number of markers to three. Change the size of the map. Extra credit: Add three different pictures to the htmlAll array.
- 12.06 - Mapping points from a XML file: Enter new coordinates in the "example.xml" file.
Change map size and define an appropriate map center.
- 12.07 - Mapping points from a JSON file: Reduce the number of coordinates in the "SW.json" data file. The center should be the middle of the remaining points.
- 12.08a - Mapping points from a flickr feed: Change the size of the map and the flickr feed to a another city in this format:
The center and zoom level are automatically set by the feed.
- 12_08b_Places_Location_by_distance - Change the size and location of the map, the type of search, and explain with this line of text
- 12_08d_Search_Autocomplete - Change the size and location of the map.
- 12_08e_Places_Autocomplete - Change the size and location of the map.
- 12.09a - KML Earthquakes in the past week: Change size and add title.
- 12.09b - KML Earthquakes with view modification: Change the view to another area. Change size and add title.
- JSON is the emerging standard for supplying geographic data feeds. The USGS makes feeds available in this format through USGS JSON Earthquake Feeds
12.09c - JSON Earthquake Markers - Change the earthquake display based on different data available from the USGS site (intensity, hourly, daily, weekly, monthly).
12.09d - JSON Earthquake Circles - Change the earthquake display based on different data available from the USGS site (intensity, hourly, daily, weekly, monthly).
12.09e - JSON Earthquake Shaded - Change the earthquake display based on different data available from the USGS site (intensity, hourly, daily, weekly, monthly).
- KML Examples: 12.10a - Ski-Jumping in Canada | 12.10b - Nuclear Power Japan - Change these two examples with other KML feeds. Weather related KML/KMZ feeds are available through NOAA. Copy link location (right-mouse click) for a link that ends in KML or KMZ. Replace the feed address in the code. Adjust view as appropriate. Change map size.
- Making your own KML file: 12.11 - KML file with three points - Change the "three_points" KML file to show three other points.
Change the address of the KML file to your server. Change map size and center. Locations are provided in KML in reverse order - longitude and then latitude. Note: This example will not display locally. It must be uploaded to the website before the KML file will be displayed.
- KML file with your own icon: 12.12 - KML Three points with icon - Change the "three_points" KML file to show three other points and another icon.
Change the address of the KML file to your server. Change map size. Locations are provided in KML in reverse order - longitude and then latitude. Note: This example will not display locally. It must be uploaded to the website before the KML file will be displayed.
- Mapping an openly available Fusion Table - 12.13 - Fusion Table Crime - Find a different public FusionTable with integrated map through the Fusion Table search page. The Fusion Table can only display a map if it contains latitude/longitude values, integrates KML, or has street addresses. Change map size.
- Selecting which points to include on the map using SQL - 12.14 - Fusion Table with SQL - SQL (Structured Query Language) is used to change which records to display from a Fusion Table Change ridership number and map size.
- 12.15a - Fusion World Cities - Change size and add title.
12.15b - Fusion World Cities GT than 5 Million - Change the population cut-off number.
Change map size.
- 12.16 - Flight Track from Minneapolis to Puerto Vallarta - Map a flight track between two other cities. 1) Choose a flight that has arrived between two cities with FlightAware Flight Finder; 2) Under "track log & graph," copy the table of data and paste into Excel. A tracklog consists of the actual and estimated positions of aircraft. Estimations are made when the plane does not have contact with a receiver on the ground.; 3) Delete unneeded columns and create an Excel file of just latitude and longitude;
4) Save and upload the Excel file to a Fusion Table; 5) Specify the two columns as signifying location within the Fusion Table; 6) Share your Fusion Table so that you can have access; 7) Check your map in the Fusion Table to make sure it displays the route properly; 8) Get the address in the File/About option; 9) Replace the address of the Fusion Table in the code; 10) Change map size.
- 12.17 - Fusion Table based on KML file - Make a Fusion Table with this KML file (use right-mouse click Save Link As ...) that shows a flight between Los Angeles and Newark. Share your Fusion Table so that you can have access. Get the address in the File/About option. Replace the address of the Fusion Table in the code. Change map size.
- 12.18 - Geocoder - Enter another address in the code so that it will be the default location of the map.
- 12.19 - Omaha Murders Fusion Table - Enter at least 5 comma-delimited street addresses into a single column of a spreadsheet and upload to a Fusion Table. Title the column "Location". Within Fusion Tables, specify the column as Location data through the drop-down menu next to the Location title. Change map size.
- 12.20 - Circles - Change location, size and color of the circles. Change map size.
- 12.21 - Circles of US Cities - Change location, size and color of the circles. Change map size.
- 12.22 - Draggable_circle - Change location, size and color of the circle. Change map size.
- 12.23 - Square_symbol - Change location, size and color of the square. Change map size.
- 12.24 - Star_symbol - Change the size, color and stroke thickness of the star
- Use EasyMapMaker to convert these street addresses to latitude/longitude values (don't bother with the key).
Paste into an Excel file. Use the concatenate function to construct a KML file in the proper format and map the points.
- Search for the smallest icon in the form of a dot. Use this icon to map out the Australia post office locations.
- Convert the world cities Fusion Table file to a KML and map.
- Map a flight track so that each point includes an infowindow with data about the current location, elevation and speed.
Return to my assignments page