Skip to content

Instantly share code, notes, and snippets.

@iljya
Last active February 12, 2021 14:13
Show Gist options
  • Save iljya/e67a2a245c6968e685c11498a8361fe0 to your computer and use it in GitHub Desktop.
Save iljya/e67a2a245c6968e685c11498a8361fe0 to your computer and use it in GitHub Desktop.
Mapserver ANCHORPOINTS with SVG symbols, SVG output - What's going on?
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
MAP
NAME SVG_ICON_ANCHORPOINT_TEST
STATUS ON
SIZE 100 100
EXTENT 0 0 0.001 0.001
IMAGECOLOR 255 255 255
IMAGETYPE svg
CONFIG "MS_ERRORFILE" "stderr"
SYMBOL
NAME "square_0_0"
TYPE svg
IMAGE "./square.svg"
ANCHORPOINT 0 0
END
SYMBOL
NAME "square_05_05"
TYPE svg
IMAGE "./square.svg"
ANCHORPOINT 0.5 0.5
END
SYMBOL
NAME "square_1_1"
TYPE svg
IMAGE "./square.svg"
ANCHORPOINT 1 1
END
SYMBOL
NAME "DEBUG"
TYPE ellipse
FILLED true
POINTS
1 1
END
END
LAYER
TYPE POINT
STATUS ON
FEATURE
POINTS
0.0004 0.0005
END
TEXT "P"
END
CLASS
STYLE
SYMBOL "square_0_0"
END
STYLE
COLOR 255 0 0
SYMBOL "DEBUG"
END
END
END
LAYER
TYPE POINT
STATUS ON
FEATURE
POINTS
0.0005 0.0005
END
TEXT "P"
END
CLASS
STYLE
SYMBOL "square_05_05"
END
STYLE
COLOR 255 0 0
SYMBOL "DEBUG"
END
END
END
LAYER
TYPE POINT
STATUS ON
FEATURE
POINTS
0.0006 0.0005
END
TEXT "P"
END
CLASS
STYLE
SYMBOL "square_1_1"
END
STYLE
COLOR 255 0 0
SYMBOL "DEBUG"
END
END
END
END
@jmckenna
Copy link

Thanks for all of this research. Added to docs as a note (MapServer/MapServer-documentation#446)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment