1
votes

We have a Google Map that loads Google Fusion Tables layers. Since the map was created, many months ago, the layer rendering order on the map has corresponded exactly to the order specified in the code. However, recently we noticed the code order is no longer being respected. In the map linked above, the counties layer should be on the bottom in order to be able to click markers from the other layers.

We have also noticed that Google's own multi-layer Fusion Table Map Example is now broken too.

Has anyone else experienced this issue? Any workarounds possible?

2

2 Answers

0
votes

As it seems now it's the reversed order.

Order means: it doesn't matter, where you define the layer , the important thing is when you set the map-property of the layer. So when you set the map-property of a layer this layer will be covered by the other layers.

Currently you first set the map for riverBasins/counties in toggleLayers, then you call setQuery where you set the map for apps(the dots):

  lyr.apps.setMap(null);
  lyr.apps.setMap(gmap);

apps always will be covered by riverBasins/counties, because it's map-property has been set finally

Possible workaround:

After setting the map-property for apps set the maps-property for riverBasins/counties again:

        fn.setQuery = function () {
            lyr.apps.query.where = ' BUS_UNIT_CODE IN (\'x\'' + buCodeList + ')';

            if (searchFilter && searchFilter !== '') {
                lyr.apps.query.where += ' AND ' + searchFilter;
            }

            lyr.apps.setMap(gmap);
            lyr.counties.setMap(lyr.counties.getMap());
            lyr.riverBasins.setMap(lyr.riverBasins.getMap());

        };

But maybe this is only a temporary behaviour, I don't think that this is a intended modification(at least it doesn't make any sense). I guess it's more a undesired side-effect of another modification and they will fix it soon.

0
votes

Our maps are now functioning properly. We used the temporary 'fix' as described at the bottom of this: https://code.google.com/p/gmaps-api-issues/issues/detail?id=6411