融合表 - 缩放到区域的边界 [英] Fusion Table - Zoom to Boundaries of Region

查看:85
本文介绍了融合表 - 缩放到区域的边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个多区域和区域地图,您可以在这里看到:
http://vciregionmap.com / new /



它在新版本中使用了此Fusion Table:
https://www.google.com/fusiontables/DataSource?snapid=S587803AEqk



它工作的很好,它唯一不做的,旧版本中用来做的 - 代码在那里,但在8个月前停止工作。



I需要图例缩放到您选择的区域和区域的边界。



我不确定如何在单击图例时使地图缩放 - 我我认为我可以在没有绘制区域和地区的限制的情况下做到这一点,但是真正需要放大(如您所见)。



以下是我遇到的问题与。 。
地图视图1 - 显示所有5个区域的边界轮廓。
地图视图2-放大区域并显示每个地区的界限。
地图视图3 - 放大显示区域范围的区域界限。

一列(Latitude),但回调例程期望2:

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

这就是为什么你会得到这个javascript错误:

 未捕获错误:无效列索引1.应该是[0-0]范围内的整数。 

6个月前融合表用户组中的线程解释问题并包含修复(此文章) 。



我想这就是你想要的做


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.

解决方案

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

这篇关于融合表 - 缩放到区域的边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆