Lik in a map

SUBSCRIBE MAPSERVER-USERS Nuri mapserver at HOTMAIL.COM
Mon Jun 27 03:26:05 EDT 2005


I created my own map. Now I need to insert a hyperlink in it. Someoen told
me that I only had to insert TEMPLATE "http://...." in the LAYER.

I tried it but it doesn't run.

My .map file is:

MAP
  IMAGETYPE      PNG
  EXTENT   10.444874 -11.210762 11.992263 -8.968610
  SIZE           282 409
  SHAPEPATH      "data"
  IMAGECOLOR     255 180 0
  FONTSET "fonts/fonts.list"

  #PROJECTION
   # "proj=laea"
   # "ellps=clrk66"
   # "lat_0=45"
   # "lon_0=-100"
    #
    # Alternatively, you can specify an EPSG code.
    # "init=epsg:2163"
    #
  #END

  # Start of LAYER DEFINITIONS --------------------------------------------
-

  LAYER # MODIS raster layer begins here
    NAME modis
    DATA "raster/prova.tif"
    STATUS DEFAULT
    TYPE RASTER
    PROCESSING "BANDS=1,2,3"
    OFFSITE 127 127 127 #Color que ha de ser transparent
    PROJECTION
      "init=epsg:4326"
    END
  END # MODIS raster layer ends here

  LAYER # Capa rectangles
    GROUP grup
    NAME rectangles
    DATA rectangle
    STATUS DEFAULT
    TYPE POLYGON
    PROJECTION
      "init=epsg:4269"
    END

    CLASSITEM "CAMP"
    CLASS
      EXPRESSION 'p'
      COLOR 255 204 102
    END
    CLASS
      EXPRESSION 'r'
      COLOR 0 0 0
    END
    CLASS
      EXPRESSION 't'
      COLOR 200 10 25
    END

  END # Fi capa rectangles

  LAYER # States polygon layer begins here
    GROUP grup
    NAME noms
    DATA rectangle
    STATUS DEFAULT
    TYPE POLYGON
    PROJECTION
      "init=epsg:4326"
    END

    CLASSITEM "CAMP"
    LABELITEM "NOM"
    CLASS
      EXPRESSION 'r'

      LABEL
        COLOR 255 255 255
        FONT arial-bold
        SIZE large
        ANTIALIAS TRUE
        POSITION CC
        PARTIALS FALSE
        MINDISTANCE 100
        BUFFER 15
      END # end of label
    END
    CLASS
      EXPRESSION 't'

      LABEL
        COLOR 0 0 0
        FONT verdana
        SIZE large
        ANTIALIAS TRUE
        POSITION CC
        PARTIALS FALSE
        MINDISTANCE 100
        BUFFER 15
      END # end of label
    END
  END # States polygon layer ends here

  LAYER
    NAME simbols
    GROUP grup
    STATUS DEFAULT
    DATA rectangle
    TYPE ANNOTATION
    TEMPLATE "http://www.nusvirtual.com"   <----- CODE INSERTED *****
    LABELITEM "SIMB"
    CLASSITEM "C"
    CLASS
      EXPRESSION "3"
      STYLE
        COLOR 0 0 0 # dummy color
        SYMBOL 'symbols/prova.gif'
      END
      LABEL
        MINFEATURESIZE 20
        MINDISTANCE 50
        POSITION CC
        SIZE TINY
        COLOR 255 255 255
      END
    END

    PROJECTION
      "init=epsg:4326"
    END
  END



  # End of LAYER DEFINITIONS -------------------------------
END # end of map file



More information about the mapserver-users mailing list