HIST296 GIS Hands-on Exercise — Fusion Tables–Part 2

Going Further — Using the API to Add Another Layer

Two options

  • Create a new map in Google Maps and add your Fusion Tables map as a layer.
  • Use the Google Maps API to add layers and other features.  We will be doing this
    option today.

Step one:

  • Leave your tabs open from the last exercise.
  • Go to the Google Docs tab and click on the third data file, phila_1956_IDoCPA_business_locations
  • Click on the “Share” button and set the visibility to either Public or Unlisted. This is important as you won’t be able to add a layer that isn’t shared.
  • If you haven’t already, do the same for the merged map you just created in Part One.

Step two:

  • Go to the Fusion TablesLayer Builder (http://fusion-tables-api-samples.googlecode.com/svn/trunk/FusionTablesLayerWizard/src/index.html) The wizard is very useful but can be painfully slow at times.
  • If it asks for permission to connect to Fusion Tables, grant permission.
  • Go back to you Fusion Tables map’s tab.
  • Click on the Tools menu and select Publish
  • Copy the Send a link URL displayed.  Not the Paste HTML code.
  • Go back to Fusion TablesLayer Builder and paste the URL in the embed link box under Add map layers.
  • Click Add Layer.
  • Zoom to Philadelphia in the embedded map window and click “Update Map” under Edit Map.

Step three:

  • Get the Numeric ID from the phila_1956_IDoCPA_business_locations file.
  • Under Add Another Feature, select “Another Layer
  • Paste the Numeric ID in the “Second Table ID” field.
  • For the Location Column, select “Site Address
  • Click “Add Layer
  • FTWizard Add Map Layer widgetThe HMTL output below the form can be used to share the new two layer map.
  • You can add up to five layers to your original map but only the original can have customized styling.
  • Take a good look at the javascript in the HTML code.  You can use this as a guide for making new maps without needing to use the wizard!
  • And you are done! (For real this time)

Bibliography

Leave a Reply

Your email address will not be published. Required fields are marked *