imagemap output format
Bob Bruce
covariance at SHAW.CA
Wed Jul 20 05:55:46 PDT 2005
Jim:
it looks like you have either got a problem with your layer definitions
in your map file or else you have an error in your definitions in your
OUTPUTFORMAT section since you are getting the map tags in your output
imagemap. Anyway, below is an imagemap map file that I was using to test
both areas and points.
Bob Bruce, Winnipeg, Manitoba
MAP
NAME WinnipegMuralsImageMapSmall
STATUS ON
EXTENT 617000 5507400 647500 5539500
SIZE 400 400
SHAPEPATH "c:/Apache/htdocs/WinnipegStreets/FullData"
FONTSET "c:/winnt/fonts/fonts.list"
# IMAGETYPE imagemap # uncommenting this will cause the FORMATOPTIONs to
stop working
IMAGECOLOR 240 240 224
UNITS METERS
PROJECTION
"datum=NAD83"
"proj=utm"
"ellps=GRS80"
"zone=14"
"north"
"no_defs"
END
OUTPUTFORMAT
NAME "TheSmallImageMap"
DRIVER imagemap
FORMATOPTION "MAPNAME=TheSmallImageMap"
FORMATOPTION "POLYHREF=click_area('%s')"
FORMATOPTION "POLYMOUSEOUT=mouseOutArea('%s')"
FORMATOPTION "POLYMOUSEOVER=mouseOverArea('%s')"
FORMATOPTION "SYMBOLHREF=javascript:ChangeTheMural(%s)"
FORMATOPTION "SYMBOLMOUSEOUT=popDown('popUp%s')"
FORMATOPTION "SYMBOLMOUSEOVER=popUp(event,'popUp%s')"
END
WEB
IMAGEPATH "c:/Apache/htdocs/temp/"
IMAGEURL "/temp/"
MAXSCALE 228000
MINSCALE 200
TEMPLATE "c:/Apache/htdocs/Mpages/TestImageMap.htm"
END
LAYER
NAME "MuralBox"
STATUS DEFAULT
DATA "WinnipegMurals"
TYPE POINT
MINSCALE 1
MAXSCALE 25000
CLASSITEM 'MURALID'
CLASS
NAME "AMuralBox"
SYMBOL 'rectangleNew'
COLOR 255 0 0
SIZE 14
END
END
SYMBOL
NAME 'rectangleNew'
TYPE VECTOR
FILLED TRUE
POINTS
0 0
4 0
4 2
0 2
0 0
END
END
LAYER
NAME "WinnipegGreenSpaces"
STATUS DEFAULT
TYPE POLYGON
DATA "WinnipegGreenSpaces"
CLASSITEM "TYPE"
LABELITEM "NAME"
MAXSCALE 25000
CLASS
NAME "Local Green Space"
EXPRESSION ""
STYLE
COLOR 0 251 125
END
END
CLASS
NAME "School"
EXPRESSION "SY"
STYLE
COLOR 0 251 125
END
LABEL
TYPE truetype
FONT 'arial'
SIZE 10
END
END
CLASS
NAME "Community Center"
EXPRESSION "CC"
STYLE
COLOR 0 251 125
END
LABEL
TYPE truetype
FONT 'arial'
SIZE 10
END
END
CLASS
NAME "Local Park"
EXPRESSION "PK"
STYLE
COLOR 0 251 125
END
LABEL
TYPE truetype
FONT 'arial'
SIZE 10
END
END
CLASS
NAME "Cemetery"
EXPRESSION "CM"
STYLE
COLOR 179 179 0
END
LABEL
TYPE truetype
FONT 'arial'
SIZE 10
END
END
END
END
On Mon, 18 Jul 2005 21:51:42 -0700, Jim Donaghy <jim at JIMDONAGHY.COM> wrote:
>Does anyone have an example map file working with the imagemap output
>format that they would not mind sharing?
>
>I'm using the ms4w binaries, and when I specify the imagemap format on
>an otherwise working mapfile with polygons defined, it outputs the html
>file with map tags but no areas defined.
>
>Thanks in advance.
More information about the MapServer-users
mailing list