creating category maps using layers from google fusion tables and google maps api

This post will demonstrate how we can use style functions of google map api to create a category map for point features stored as Tables in Google Fusion Tables.

1. Let us take a look at our table-schools- in Google Fusion Tables: You will notice that the table has a geometry field (red boxed) and the attribute fields of these points have values that define their type, category and the settlements where they are located. We will be writing a series of code lines that would draw a map where the features are categorized according to the type of schools they represent on the map.

1

2. Go to the address URl and copy the portion as shown on the screenshot below.

2

3. Now let us write the code using the fusion table data. Explanations are in red.

styling point feature layer from google fusion tables - Notepad

You can download the plain text file version from here:

https://www.dropbox.com/s/cvjbpq8oy3jybl6/styling%20point%20feature%20layer%20from%20google%20fusion%20tables.txt?dl=0

4. The resultant map is shown in the screenshot below:

10

Click on the link to view a live map at my github page:http://htmlpreview.github.io/?https://github.com/mayotunde/google/blob/master/styling%20point%20features%20from%20fusion%20tables

Thank you for following the blog

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s