通过编程实现要素在图层上的动态过滤

大家在项目过程中也许会遇到下面的情况,一个数据源中有几十万、上百万的数据,而实际显示在地图上确并不需要全部显示,而且全部显示的话也太慢了,有没有一中办法来动态设置过滤器呢?当然MapGuide作为一个WebGIS平台,同时在线的用户肯定很多,必须实现过滤器只适用于当前用户,否则一个人设个条件,其他人想看的也看不到了,岂不是天下大乱?!

鉴于这个问题是个很常见的需求,我用E文详细描述的其实现的原理和过程,并附有完整的实现代码,发表在ADN DevBlog上,大家可以到那边去看。

 

Set filter for layer at runtime in Autodesk Infrastructure Map Server or MapGuide Enterprise

When developing application on Autodesk Infrastructure Map Server, you may want to apply a filter to a layer to hide some features. In this post, I will demonstrate how to do this programmatically.

How to do in Infrastructure Studio UI

Firstly, let’s take a look how we can do the same using Infrastructure Studio UI. Open the layer in Infrastructure Studio, you will notice that you can set filter for layer by setting “Filter applied to data”, click the “…” button to open the expression editor, which helps you create filter string more easier. In this case, I set a filter for parcels layer:

Autogenerated_SDF_ID  > 10000

image

If you save the changes and click “refresh” button in layer preview, you will notice that the layer is filtered.

 

点击这里查看全文:

http://adndevblog.typepad.com/infrastructure/2012/04/set-filter-for-layer-at-runtime-in-autodesk-infrastructure-map-server-or-mapguide-open-source.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值