| 197 | | printf("got an output format!\n"); |
|---|
| 198 | | |
|---|
| 199 | | } else { |
|---|
| 200 | | if(mapserv->Map->querymap.status) { |
|---|
| 201 | | checkWebScale(mapserv); |
|---|
| 202 | | |
|---|
| 203 | | img = msDrawMap(mapserv->Map, MS_TRUE); |
|---|
| | 196 | if( !MS_RENDERER_TEMPLATE(outputFormat) ) { /* got an image format, return the query results that way */ |
|---|
| | 197 | |
|---|
| | 198 | } |
|---|
| | 199 | } |
|---|
| | 200 | |
|---|
| | 201 | /* |
|---|
| | 202 | ** At this point we know we have a template of some sort, either the new style that references a or the old |
|---|
| | 203 | ** style made up of external files slammed together. Either way we may have to compute a query map. |
|---|
| | 204 | */ |
|---|
| | 205 | if(mapserv->Map->querymap.status) { |
|---|
| | 206 | checkWebScale(mapserv); |
|---|
| | 207 | |
|---|
| | 208 | img = msDrawMap(mapserv->Map, MS_TRUE); |
|---|
| | 209 | if(!img) return MS_FAILURE; |
|---|
| | 210 | snprintf(buffer, 1024, "%s%s%s.%s", mapserv->Map->web.imagepath, mapserv->Map->name, mapserv->Id, MS_IMAGE_EXTENSION(mapserv->Map->outputformat)); |
|---|
| | 211 | status = msSaveImage(mapserv->Map, img, buffer); |
|---|
| | 212 | if(status != MS_SUCCESS) return status; |
|---|
| | 213 | msFreeImage(img); |
|---|
| | 214 | |
|---|
| | 215 | if((mapserv->Map->legend.status == MS_ON || mapserv->UseShapes) && mapserv->Map->legend.template == NULL) { |
|---|
| | 216 | img = msDrawLegend(mapserv->Map, MS_FALSE); |
|---|
| 212 | | |
|---|
| 213 | | if((mapserv->Map->legend.status == MS_ON || mapserv->UseShapes) && mapserv->Map->legend.template == NULL) { |
|---|
| 214 | | img = msDrawLegend(mapserv->Map, MS_FALSE); |
|---|
| 215 | | if(!img) return MS_FAILURE; |
|---|
| 216 | | snprintf(buffer, 1024, "%s%sleg%s.%s", mapserv->Map->web.imagepath, mapserv->Map->name, mapserv->Id, MS_IMAGE_EXTENSION(mapserv->Map->outputformat)); |
|---|
| 217 | | status = msSaveImage(mapserv->Map, img, buffer); |
|---|
| 218 | | if(status != MS_SUCCESS) return status; |
|---|
| 219 | | msFreeImage(img); |
|---|
| 220 | | } |
|---|
| | 222 | } |
|---|
| 222 | | if(mapserv->Map->scalebar.status == MS_ON) { |
|---|
| 223 | | img = msDrawScalebar(mapserv->Map); |
|---|
| 224 | | if(!img) return MS_FAILURE; |
|---|
| 225 | | snprintf(buffer, 1024, "%s%ssb%s.%s", mapserv->Map->web.imagepath, mapserv->Map->name, mapserv->Id, MS_IMAGE_EXTENSION(mapserv->Map->outputformat)); |
|---|
| 226 | | status = msSaveImage( mapserv->Map, img, buffer); |
|---|
| 227 | | if(status != MS_SUCCESS) return status; |
|---|
| 228 | | msFreeImage(img); |
|---|
| 229 | | } |
|---|
| | 224 | if(mapserv->Map->scalebar.status == MS_ON) { |
|---|
| | 225 | img = msDrawScalebar(mapserv->Map); |
|---|
| | 226 | if(!img) return MS_FAILURE; |
|---|
| | 227 | snprintf(buffer, 1024, "%s%ssb%s.%s", mapserv->Map->web.imagepath, mapserv->Map->name, mapserv->Id, MS_IMAGE_EXTENSION(mapserv->Map->outputformat)); |
|---|
| | 228 | status = msSaveImage( mapserv->Map, img, buffer); |
|---|
| | 229 | if(status != MS_SUCCESS) return status; |
|---|
| | 230 | msFreeImage(img); |
|---|
| | 231 | } |
|---|
| 231 | | if(mapserv->Map->reference.status == MS_ON) { |
|---|
| 232 | | img = msDrawReferenceMap(mapserv->Map); |
|---|
| 233 | | if(!img) return MS_FAILURE; |
|---|
| 234 | | snprintf(buffer, 1024, "%s%sref%s.%s", mapserv->Map->web.imagepath, mapserv->Map->name, mapserv->Id, MS_IMAGE_EXTENSION(mapserv->Map->outputformat)); |
|---|
| 235 | | status = msSaveImage(mapserv->Map, img, buffer); |
|---|
| 236 | | if(status != MS_SUCCESS) return status; |
|---|
| 237 | | msFreeImage(img); |
|---|
| 238 | | } |
|---|
| 239 | | } |
|---|
| 240 | | |
|---|
| | 233 | if(mapserv->Map->reference.status == MS_ON) { |
|---|
| | 234 | img = msDrawReferenceMap(mapserv->Map); |
|---|
| | 235 | if(!img) return MS_FAILURE; |
|---|
| | 236 | snprintf(buffer, 1024, "%s%sref%s.%s", mapserv->Map->web.imagepath, mapserv->Map->name, mapserv->Id, MS_IMAGE_EXTENSION(mapserv->Map->outputformat)); |
|---|
| | 237 | status = msSaveImage(mapserv->Map, img, buffer); |
|---|
| | 238 | if(status != MS_SUCCESS) return status; |
|---|
| | 239 | msFreeImage(img); |
|---|
| | 240 | } |
|---|
| | 241 | } |
|---|
| | 242 | |
|---|
| | 243 | if(outputFormat) { |
|---|
| | 244 | printf("got an output format!\n"); |
|---|
| | 245 | } else { |
|---|
| 824 | | if(strstr(*line, "[/features]") == NULL) { /* we know the closing tag must be here, if not throw an error */ |
|---|
| 825 | | msSetError(MS_WEBERR, "[features] tag found without closing [/features].", "processFeaturesTag()"); |
|---|
| | 829 | if(strstr(*line, "[/feature]") == NULL) { /* we know the closing tag must be here, if not throw an error */ |
|---|
| | 830 | msSetError(MS_WEBERR, "[feature] tag found without closing [/feature].", "processFeatureTag()"); |
|---|