This tutorial is for total beginners I assume that you have some knowledge of HTML. You don't have to be an expert, just remember coding it's intelligent copy & paste.
1. First you need to upload data to Fusion Tables and create map, how to - you can check in this tutorial .
2. Now it's starting to be more fun, you need to create FusionTableLayer, the best way is to use Fusion Table Layer Wizard from Google. Just follow instructions.
TIP: If you get error "no viz=MAP found" just copy the publish link from MAP tab. And remember to share your table first.
3. Finally we got our FusionTableLayer, all we need to do is to copy ID only. Let's try to keep it simple so don't change other parameters for now.
4. Copy ID and keep it in notepad or other text editor like Notepad ++. Now download repo from GitHub and open slider_tutorial_example.html file in text editor.
TIP: Try to not using WYSWIG editors in most case they add some addition code automatically to your html file, and we don't need this...
6. Now we need to set parameter of our slider [ line 98].
What is important, this slider will query only selected column (one column).
TIP: For start we can use simple operators like below
== Equal to != Not equal to > Greater than >= Greater than or equal to < Less than <= Less than or equal to
7. Save it and run in your internet browser, if your set everything correct you should see your map. If not you need to go back and correct.
TIP: You can inspect errors with your browser Inspect Element function, just right click on page and Inspect Element and then Console. You will see all JavaScript errors. This function depend on the browser in Chrome and Firefox it's build in in other you need to add this.
8. Now we can play with slider settings, depending on data we store in our fusion tables [line 88-91].
DEMO on GitHUB
No comments:
Post a Comment