我需要帮助来构建我的地图

时间:2014-02-01 13:32:35

标签: openlayers postgis mapserver

问题我已经设置了我的图层和我的课程但没有出现任何内容,根本没有出现任何内容!

LAYER
CONNECTION "host=xxx.x.x.x user=xxxxxx password=***** port=5432 dbname=banco"
CONNECTIONTYPE POSTGIS
DATA "geom from (Select cnes, st_difference( st_buffer( st_union(geom),500), st_union(geom)) as geom from estabelecimento where geom is not null and %FILTRO_AREA_ATENDIMENTO% group by cnes) as area using unique cnes using srid=4326"
METADATA
  "FILTRO_AREA_ATENDIMENTO_validation_pattern"  ".*"
  "default_FILTRO_AREA_ATENDIMENTO" "cnes ilike '%%%'"
  "wms_include_items"   "all"
  "gml_include_items"   "all"
  "wms_title"   "Área de atendimento por estabelecimento"
END # METADATA
NAME "area_atendimento"
STATUS ON
TILEITEM "location"
TYPE POINT
UNITS METERS
CLASS
  NAME "Raio de atendimento"
  STYLE
    ANGLE 0
    COLOR 0 0 0
    OFFSET 0 0
    OPACITY 40
    OUTLINECOLOR 0 0 0
    SIZE 15
    SYMBOL "circulo_siab"
  END # STYLE
  TEMPLATE "/home/geo/templates/area_atendimento.html"
END # CLASS       END # LAYER

请帮帮我

1 个答案:

答案 0 :(得分:0)

您缺少运行时替换的VALIDATION块。看到: http://mapserver.org/cgi/runsub.html

VALIDATION
  'FILTRO_AREA_ATENDIMENTO' '.'  # this validates everything
                                 # you should change this to a regex like
                                 # '^<some pattern>$'
  'default_FILTRO_AREA_ATENDIMENTO' 'some default text'
END