MCPcopy Index your code
hub / github.com/MapServer/MapServer / msGetOutputFormatIndex

Function msGetOutputFormatIndex

mapoutput.c:563–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561/************************************************************************/
562
563int msGetOutputFormatIndex(mapObj *map, const char *imagetype)
564{
565 int i;
566/* -------------------------------------------------------------------- */
567/* Try to find the format in the maps list of formats, first by */
568/* mime type, and then by output format name. */
569/* -------------------------------------------------------------------- */
570 for (i = 0; i < map->numoutputformats; i++)
571 {
572 if (map->outputformatlist[i]->mimetype != NULL
573 && strcasecmp(imagetype,
574 map->outputformatlist[i]->mimetype) == 0 )
575 return i;
576 }
577
578 for( i = 0; i < map->numoutputformats; i++ )
579 {
580 if( strcasecmp(imagetype,map->outputformatlist[i]->name) == 0 )
581 return i;
582 }
583
584 return -1;
585}
586
587/************************************************************************/
588/* msSelectOutputFormat() */

Callers 7

msRemoveOutputFormatFunction · 0.85
msSelectOutputFormatFunction · 0.85
msOwsIsOutputFormatValidFunction · 0.85
msWCSGetCoverageFunction · 0.85
msWCSGetCoverage20Function · 0.85
msReturnTemplateQueryFunction · 0.85
msWFSGetOutputFormatListFunction · 0.85

Calls 1

strcasecmpFunction · 0.85

Tested by

no test coverage detected