Multiple Fusion Tables Layers on single map; second won't display

115 views
Skip to first unread message

JKurtock

unread,
Aug 15, 2011, 4:32:58 PM8/15/11
to Google Maps JavaScript API v3
www.grizz.org/db/c/FTDisplayTest.html

I am trying to display two Fusion Tables layers (same table, different
WHERE clause) with the ability to switch the layers on and off (so I
chose to not use styles). The first-created layer displays correctly,
but the second layer does not display. If the first layer is switched
off (with layer1.setMap(null) ), the second layer can be turned on.
But I cannot get them both on at the same time. (The test page above
has buttons for switching the layers.)

The documentation says that I should be able to get 5 layers on a map,
http://code.google.com/intl/en/apis/maps/documentation/javascript/overlays.html#FusionTables,
so my problem surely lies elsewhere.

This has all the hallmarks of a dumb typing mistake, so I am hoping
someone can spot it with little work.

- Jeff


JKurtock

unread,
Aug 15, 2011, 8:43:46 PM8/15/11
to Google Maps JavaScript API v3
The answer is: you can have up to 5 Fusion Tables layers, but only one
can have styles. In my case, both layers had styles, so the "second"
layer (to be drawn) did not appear.

It looks like I'll need to use layer.setOptions to replace all of the
options when I want to turn a "layer" (now just a style) on or off.

- Jeff

On Aug 15, 1:32 pm, JKurtock <jkurt...@gmail.com> wrote:
> www.grizz.org/db/c/FTDisplayTest.html
>
> I am trying to display two Fusion Tables layers (same table, different
> WHERE clause) with the ability to switch the layers on and off (so I
> chose to not use styles).  The first-created layer displays correctly,
> but the second layer does not display.  If the first layer is switched
> off (with layer1.setMap(null) ), the second layer can be turned on.
> But I cannot get them both on at the same time.  (The test page above
> has buttons for switching the layers.)
>
> The documentation says that I should be able to get 5 layers on a map,http://code.google.com/intl/en/apis/maps/documentation/javascript/ove...,

Damian Janowski

unread,
Sep 8, 2011, 5:32:02 PM9/8/11
to google-map...@googlegroups.com
I think being unable to differentiate between the multiple layers on the same maps makes the feature virtually unusable.

Please vote this feature request if you're having the same issue: http://code.google.com/p/gmaps-api-issues/issues/detail?id=3609

geoco...@gmail.com

unread,
Sep 8, 2011, 6:15:50 PM9/8/11
to Google Maps JavaScript API v3
On Sep 8, 2:32 pm, Damian Janowski <damian.janow...@gmail.com> wrote:
> I think being unable to differentiate between the multiple layers on the
> same maps makes the feature virtually unusable.

I don't understand why you can't style the markers from each Fusion
Table to have a unique marker. Why do you need to apply dynamic
styling to multiple tables?

Can you provide an example that requires this?

-- Larry

Damian Janowski

unread,
Sep 12, 2011, 12:31:51 PM9/12/11
to google-map...@googlegroups.com
On Thu, Sep 8, 2011 at 7:15 PM, geoco...@gmail.com
<geoco...@gmail.com> wrote:
> I don't understand why you can't style the markers from each Fusion
> Table to have a unique marker.  Why do you need to apply dynamic
> styling to multiple tables?

Simply due of ignorance :-)

I did not know that the styles that I configured in the FT UI would
appear when using the FusionTablesLayer.

Thanks, Larry!

Damian Janowski

unread,
Sep 12, 2011, 12:32:04 PM9/12/11
to google-map...@googlegroups.com
On Mon, Sep 12, 2011 at 1:31 PM, Damian Janowski <ja...@dimaion.com> wrote:
> Simply due of ignorance :-)

s/of/to

Reply all
Reply to author
Forward
0 new messages