zoukankan      html  css  js  c++  java
  • MapGuide/Map 3D 2011中Expression Builder中Concat的改进

    MapGuide/Map 3D 2011中的Expression Builder是个很有用的工具,比如我们经常需要为图层设置ToolTip,URL连接,或者构造过滤字符串,这时都可以用可视化的Expression Builder来生成表达式。

    image

    点击右边的按钮即可激活Expression Builder。通过这个可视化工具你可以读取指定字段的值,并使用 + – X / 等运算符号、数学公式、字符串函数、日期函数、空间查询等等。

    image

    这个工具方便是方便,但是他的字符串相加功能实在是能搞晕一大帮人,2010的版本中Concat()函数只能接受2个参数,如果你的字符串是多个部分组成的,你不得不嵌套多个concat,后面一大堆的括号,稍不注意就会出错,比如:

    concat('Parcel\nName: ', concat(RNAME, concat('\nAddress: ', RBILAD)))

    现在好了,MapGuide/Map 3D 2011中对这个方法做了改进,你可以连接多个字符串,如:

    concat('Parcel\nName: ', RNAME, '\nAddress: ', RBILAD)
    

    是不是方便了很多? 

    看一下详细的帮助信息,按F!可以调出详细帮助信息:

    Function
    CONCAT

    Joins multiple strings into one.

    Definition

    CONCAT takes any number of arguments, which can be any property type except Geometry or Raster. The return value uses the String data type.

    Use ‘\n’ to insert a line break. To include static text labels or spaces, surround them with single quotes.

    When you use Concat with a Boolean property, the operation generates 1/0 (not True/False) as a result.

    Syntax

    CONCAT(Property, Property, ...)

    Example

    CONCAT(First_Name, ‘ ‘Last_Name,’\n’ ‘Address: ‘, Street_number, ‘ ‘, Street_name, ‘ ‘, Suffix)

    这里例子的结果:

    John Smith

    Address: 123 Maple Street

     

    -------------------

    峻祁连(Daniel)

    作者:峻祁连
    邮箱:junqilian@163.com
    出处:http://junqilian.cnblogs.com
    转载请保留此信息。
  • 相关阅读:
    BZOJ3518 : 点组计数
    BZOJ2217 : [Poi2011]Lollipop
    李洪强经典面试题40-可能碰到的iOS笔试面试题-C语言
    对AFN的二次封装
    李洪强经典面试题39-iOS 程序员 6 级考试(答案和解释)
    iOS五种本地缓存数据方式
    iOS开发网络篇—数据缓存
    iOS中的通知
    李洪强漫谈iOS开发[C语言-048]-打印平方表
    李洪强漫谈iOS开发[C语言-047]-数列求和
  • 原文地址:https://www.cnblogs.com/junqilian/p/1764647.html
Copyright © 2011-2022 走看看