Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Enable the visual refresh of google maps using google.maps.visualRefresh = true; #18

Merged
merged 3 commits into from
Jun 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,27 @@ For reference, styleId 1 is the default look - usually small red dots or red pol

For more information, see [Working with styles](https://developers.google.com/fusiontables/docs/v1/using#WorkingStyles) and [Working with templates](https://developers.google.com/fusiontables/docs/v1/using#WorkingInfoWindows) in the Fusion Tables documentation.

### I want to display custom icons on my map

By default, Fusion Tables only provides 10 (5 large and 5 small) marker icons.

<img src="http://storage.googleapis.com/support-kms-prod/SNP_2752125_en_v0" alt="small red map dot" title="small red map dot" width="9" height="9">&nbsp;<img src="http://storage.googleapis.com/support-kms-prod/SNP_2752063_en_v0" alt="small yellow map dot" title="small yellow map dot" width="9" height="9">&nbsp;<img src="http://storage.googleapis.com/support-kms-prod/SNP_2752129_en_v0" alt="small green map dot" title="small green map dot" width="9" height="9">&nbsp;<img src="http://storage.googleapis.com/support-kms-prod/SNP_2752068_en_v0" alt="small blue map dot" title="small blue map dot" width="9" height="9">&nbsp;<img src="http://storage.googleapis.com/support-kms-prod/SNP_2752264_en_v0" alt="small purple map dot" title="small purple map dot" width="9" height="9">&nbsp;<img alt="large_red" src="http://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=|FF0000">&nbsp;<img alt="large_yellow" src="http://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=|FFFF00">&nbsp;<img alt="large_green" src="http://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=|00FF00">&nbsp;<img alt="large_blue" src="http://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=|6699FF">&nbsp;<img alt="large_purple" src="http://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=|9933FF">

From my understanding, this is for performance reasons (the map and icon tiles are cached). However, there are two ways to work around it:

1. Use some of the 200 additional icons provided by Google. [This page](http://support.google.com/fusiontables/answer/2679986?hl=en) gives a good tutorial.
1. Use the Fusion Tables API to fetch your data and then draw your own markers using the Google Maps v3 API. Take a look at [this example](https://code.google.com/p/gmaps-samples/source/browse/trunk/fusiontables/custom_markers.html?spec=svn2515&r=2515) (warning: more advanced programming ahead!)

### My map works, but the results count returns 0

The results counter uses the Fusion Tables API, which requires an API key and some specific sharing permissions. Try the following in this order:

1. Make sure you set fusionTableId to a valid API key. It should look something like `1m4Ez9xyTGfY2CU6O-UgEcPzlS0rnzLU93e4Faa0`. To get a new one, go to the [Google API Console](https://code.google.com/apis/console/)
1. Make sure that 'Allow Downloads' is checked for your Fusion Table (File => About this table => Edit table information)

## Still can't figure it out or more detail needed?

Email me! [Derek Eder](mailto:derek.eder+git@gmail.com)
[Email me!](mailto:derek.eder+git@gmail.com) Please make sure to provide a link to your current project for easier troubleshooting. I try to respond within a week or so.

## Contributors

Expand All @@ -137,6 +155,6 @@ Email me! [Derek Eder](mailto:derek.eder+git@gmail.com)

## Copyright

Copyright (c) 2012 Derek Eder. Released under the MIT License.
Copyright (c) 2013 Derek Eder. Released under the MIT License.

See [LICENSE](https://github.com/derekeder/FusionTable-Map-Template/wiki/License) for details
See [LICENSE](https://github.com/derekeder/FusionTable-Map-Template/blob/master/LICENSE) for details
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h4>Custom filters and views</h4>
<p class='alert alert-info lead' id='result_count'></p>
</div>
<div class='span8'>
<div id='map_canvas'></div>
<noscript><strong>NOTE: Please Enable JavaScript to view the Map Search!</strong><p></p></noscript><div id='map_canvas'></div>
<p class='pull-right'>
<a href='http://derekeder.com/searchable_map_template/'>Searchable Map Template</a> by <a href='http://derekeder.com'>Derek Eder</a>.
</p>
Expand Down Expand Up @@ -135,4 +135,4 @@ <h4>Custom filters and views</h4>
//]]>
</script>
</body>
</html>
</html>
3 changes: 3 additions & 0 deletions source/maps_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
*
*/

// Enable the visual refresh
google.maps.visualRefresh = true;

var MapsLib = MapsLib || {};
var MapsLib = {

Expand Down