[MapServer-users] Can I call mapserver with GetLegendGraphic request using curl?

Schweitzer, Peter N pschweitzer at usgs.gov
Thu Dec 14 13:32:00 PST 2023


I have map interfaces that use a dozen or so legend graphics, but it requires separate calls to mapserver for every user.  I would prefer to cache these images (PNG) rather than make mapserver recalculate the same legend graphic many times for each user session.  But when I do a curl, I keep getting the "requires a TEMPLATE" message.  The images work within my JS (OpenLayers 5.3), but not through a stand-alone web request.

Example:  https://mrdata.usgs.gov/general/map-global.html  27 calls to mapserv to get legend images that don't change.

Is there a way I can get these images and cache them on the server so that mapserver doesn't have to chew up processor cycles and time for them every time?

Thanks for any help you may be able to offer.

Peter

Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  email: pschweitzer at usgs.gov
https://www.usgs.gov/staff-profiles/peter-n-schweitzer
https://orcid.org/0000-0002-9532-6681
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231214/221de831/attachment.htm>


More information about the MapServer-users mailing list