The Google Fusion Tables API v1 has been deprecated as of May 3rd, 2016. The API will continue to work until August 1st, 2017, and will shut down on that date. A migration guide is available outlining the steps to take to migrate to v2.

Fusion Tables Layer Example: Custom Markers

<!DOCTYPE html>
  Copyright 2011 Google Inc. All Rights Reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  See the License for the specific language governing permissions and
  limitations under the License.
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="UTF-8">

    <title>Fusion Tables Layer Example: Custom Markers</title>

    <link href="/apis/fusiontables/docs/samples/style/default.css"
        rel="stylesheet" type="text/css">
    <script type="text/javascript"
    <script type="text/javascript" src=""></script>

    <script type="text/javascript">
      google.load('visualization', '1');

      function initialize() {
        var infoWindow = new google.maps.InfoWindow();
        var map = new google.maps.Map(document.getElementById('map-canvas'), {
          center: new google.maps.LatLng(37.4, -122.1),
          zoom: 10,
          mapTypeId: google.maps.MapTypeId.ROADMAP

        // Send query to Google Chart Tools to get data from table.
        // Note: the Chart Tools API returns up to 500 rows.
        var query = "SELECT 'Store Name', Coordinates, delivery FROM 15UY2pgiz8sRkq37p2TaJd64U7M_2HDVqHT3Quw";
        query = encodeURIComponent(query);
        var gvizQuery = new google.visualization.Query(
            '' + query);

        var createMarker = function(coordinate, store, delivery) {
          var marker = new google.maps.Marker({
            map: map,
            position: coordinate,
            icon: new google.maps.MarkerImage('images/fusion_tables-32.png')
          google.maps.event.addListener(marker, 'click', function(event) {
            infoWindow.setContent(store + '<br>Delivers? ' + delivery);

        gvizQuery.send(function(response) {
          var numRows = response.getDataTable().getNumberOfRows();

          // For each row in the table, create a marker
          for (var i = 0; i < numRows; i++) {
            var stringCoordinates = response.getDataTable().getValue(i, 1);
            var splitCoordinates = stringCoordinates.split(',');
            var lat = splitCoordinates[0];
            var lng = splitCoordinates[1];
            var coordinate = new google.maps.LatLng(lat, lng);
            var store = response.getDataTable().getValue(i, 0);
            var delivery = response.getDataTable().getValue(i, 2);

            createMarker(coordinate, store, delivery);

      google.maps.event.addDomListener(window, 'load', initialize);


    <div id="map-canvas"></div>