Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am new to GIS. I want to pass a parameter map file dynamically. Or how map file fetches the data from the database. I can't find out the solution. This is my map script.

     LAYER
CLASSITEM "ogc_fid"
CONNECTION "user=postgres password=abc@123 dbname=GISTest port=5433 host=localhost"
CONNECTIONTYPE POSTGIS
DATA "wkb_geometry FROM ( select ogc_fid,wkb_geometry from current_loc where executive_code = 'EXEC14' and date(visit_date) = date (now())  )AS resultset using unique ogc_fid using unique wkb_geometry using SRID=4326"
DUMP TRUE
GROUP "Thematic"
METADATA
  "DESCRIPTION" "EXEC14 Current Location"
  "LAYERGROUP"  "Tracking"
  "DB_TABLE"    "gslivegeo"
  "gml_featureid"   "ogc_fid"
  "EDITABLE_COLUM_NAMES"    "wkb_geometry"
  "isSearched"  "true"
  "wfs_title"   "GSRetailer"
  "gml_include_items"   "all"
  "wms_title"   "GSRetailer"
END
NAME "EXEC14Cur"
PROCESSING "CLOSE_CONNECTION=DEFER"
PROJECTION
  "init=epsg:4326"
END
STATUS ON
TEMPLATE "in_text2.xml"
TOLERANCE 10
TYPE POINT
UNITS METERS
CLASS
  NAME "current"
  STYLE
    ANGLE 360
    COLOR 0 255 0
    OPACITY 100
    OUTLINECOLOR 71 60 139
    SIZE 30
    SYMBOL "house1"
  END
END

END

I have hard coded the executive code & visit date. How we can pass the value at runtime?

Please let me know how this map file reads by java/map script to retrieve database records.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.