Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7719553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:26:43+00:00 2026-06-01T03:26:43+00:00

I have this implementation with fusion table layers where I try to use the

  • 0

I have this implementation with fusion table layers where I try to use the pre-defined marker icons with letters A-Z to show the result of a search query on map (much like the original google maps does).

The way I achieve this is by first creating a layer, with a generic icon for all markers..

var layer = new google.maps.FusionTablesLayer({
    query: {
        select: 'Geometry',
        from: 0000000
    },
    map: map,
    options: {
        suppressInfoWindows: true
    },
    styles: [{
        markerOptions: {
            iconName: "measle_white"
        }
    }]
});

Meanwhile, I query the same table for 25 results with a ST_DISTANCE ordering based on where my map is centered (geopositioned),

var queryUrlHead = 'http://www.google.com/fusiontables/api/query?sql=',
    queryUrlTail = '&jsonCallback=success',
    query = 'SELECT+ID+FROM+0000000+ORDER+BY+ST_DISTANCE(Geometry,LATLNG('+position.coords.latitude+','+position.coords.longitude+'))+LIMIT+25';

var queryurl = queryUrlHead + query + queryUrlTail;

The returned JSON object is an array of unique ID’s which I call ‘ids’. I then use some trigger (zoomchanged) to redraw the 25 nearest icons with the letter icons (insprired by this).

    google.maps.event.addListener(map, 'zoom_changed', function () {

layer.setOptions({
    styles: [{
            markerOptions: {
                iconName: "measle_white"
            }
        }, //fallback
        {
            where: "'ID' = " + ids.table.rows[0][0],
            markerOptions: {
                iconName: "a_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[1][0],
            markerOptions: {
                iconName: "b_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[2][0],
            markerOptions: {
                iconName: "c_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[3][0],
            markerOptions: {
                iconName: "d_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[4][0],
            markerOptions: {
                iconName: "e_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[5][0],
            markerOptions: {
                iconName: "f_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[6][0],
            markerOptions: {
                iconName: "g_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[7][0],
            markerOptions: {
                iconName: "h_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[8][0],
            markerOptions: {
                iconName: "i_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[9][0],
            markerOptions: {
                iconName: "j_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[10][0],
            markerOptions: {
                iconName: "k_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[11][0],
            markerOptions: {
                iconName: "l_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[12][0],
            markerOptions: {
                iconName: "m_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[13][0],
            markerOptions: {
                iconName: "n_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[14][0],
            markerOptions: {
                iconName: "o_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[15][0],
            markerOptions: {
                iconName: "p_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[16][0],
            markerOptions: {
                iconName: "q_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[17][0],
            markerOptions: {
                iconName: "r_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[18][0],
            markerOptions: {
                iconName: "s_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[19][0],
            markerOptions: {
                iconName: "t_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[20][0],
            markerOptions: {
                iconName: "u_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[21][0],
            markerOptions: {
                iconName: "v_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[22][0],
            markerOptions: {
                iconName: "w_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[23][0],
            markerOptions: {
                iconName: "x_blue"
            }
        }, {
            where: "'ID' = " + ids.table.rows[24][0],
            markerOptions: {
                iconName: "z_blue"
            }
        }
    ]
});

Now, this actually works brilliantly except only for the top 5 results A-D (+1 for the fallback icon). What went wrong here? Did I hit some limit (markerOptions only takes 5 values??) or did I mess up the code?

Sidenote: This example appears to have more than 5 icons per layer, but Google made it and I don’t understand any of it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:26:44+00:00Added an answer on June 1, 2026 at 3:26 am

    Sorry, but only 5 styles can be set via the Maps API. This limit is mentioned in the developers guide.
    I suspect that the map displaying all possible icons is not a FT layer. You can have many more styles if it’s done via the FT UI, but that is not dynamic and probably won’t work for your situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our data access layer at work we have this standard implementation where the
I have this pimpl design where the implementation classes are polymorphic but the interfaces
Would you call this implementation of a multiton in objective-c 'elegant'? I have programmatically
Say I have this code: #import <UIKit/UIKit.h> @interface MyView : UIView @end @implementation MyView
In my code, I have something that looks like this: @implementation MyClass - (id)
I have a simple html multiline tooltip implementation: this.tooltip = function(tag) { xOffset =
If I have a service definition/implementation like this: using System; using System.ServiceModel; namespace aspace.service
In relation to this question ( Efficient hashCode() implementation ) I have one more
This question may seem a little bit stackoverflow-implementation specific, but I have seen a
Paramiko's SFTPClient apparently does not have an exists method. This is my current implementation:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.