Fusion Table - Zoom to Boundaries of Region

天涯浪子 提交于 2019-12-08 13:37:03

问题


I am creating a multiregion and district map which you can see here: http://vciregionmap.com/new/

It used this Fusion Table in the new version: https://www.google.com/fusiontables/DataSource?snapid=S587803AEqk

It works great, the only thing it does not do and used to do in the old version - the code is in there but stopped working about 8 months ago.

I need the legend to is zoom to the bounds of the region and district that you choose.

I am unsure of how to get the map to zoom upon clicking the legend - I think I may be able to do without drawing the bounds of regions and districts, but the zoom (as you see) is really needed.

Here is what I am having issues with . . Map View 1 - Show all 5 Regions with outline on bounds of Region. Map View 2- Zoom into Region and show bounds for each district. Map View 3 - Zoom into District bounds showing only markers for that district.


回答1:


Your query is only "selecting" one column (Latitude), but the callback routine expects 2:

      parseFloat(response.getDataTable().getValue(i, 0)),
      parseFloat(response.getDataTable().getValue(i, 1)));

That is why you get this javascript error:

Uncaught Error: Invalid column index 1. Should be an integer in the range [0-0]. 

This thread in the fusion tables users group from 6 months ago explains the problem and includes the fix (this post).

I think this is what you are trying to do



来源:https://stackoverflow.com/questions/11572421/fusion-table-zoom-to-boundaries-of-region

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!