Problem/Motivation
Needed a simple way to use SVG markers instead of standard graphics.
Proposed resolution
Add MIME checking on the marker filenames and handle SVGs differently than other image files.
API changes
The _gmap_get_icondata()
method in gmap_markerinfo.inc
will read the SVG info out of the ini file but because it's using getimagesize()
against the marker filename, it's unable to determine the "dimensions" of an SVG file. This information is sometimes in the height
and width
attributes of the svg file, and it can also be calculated using the viewBox
attribute. I've attached a patch that does the job for me, but not being an SVG expert I don't know if there are other ways of doing this; I can only vouch that this solved the issue for me.
Comment | File | Size | Author |
---|---|---|---|
gmap_markerinfo.patch | 1.49 KB | tmountjr | |
Comments