Changes between Version 57 and Version 58 of ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
- Timestamp:
- Oct 16, 2010, 3:38:09 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
v57 v58 844 844 OGRGeometryH geometry,res; 845 845 map* tmp1=getMapFromMaps(inputs,"InputPolygon","value"); 846 if(tmp==NULL) 846 if(tmp==NULL){ 847 setMapInMaps(conf,"lenv","message","Unable to fetch InputPolygon value."); 847 848 return SERVICE_FAILED; 849 } 848 850 map* tmp1=getMapFromMaps(inputs,"InputPolygon","mimeType"); 849 851 if(strncmp(tmp->value,"application/json",16)==0) … … 858 860 tmp1=getMapFromMaps(outputs,"Result","mimeType"); 859 861 if(strncmp(tmp1->value,"application/json",16)==0){ 860 addToMap(outputs->content,"value",OGR_G_ExportToJson(res)); 861 addToMap(outputs->content,"mimeType","text/plain"); 862 char *tmp=OGR_G_ExportToJson(res); 863 setMapInMaps(outputs,"Result","value",tmp); 864 setMapInMaps(outputs,"Result","mimeType","text/plain"); 865 free(tmp); 862 866 } 863 867 else{ 864 addToMap(outputs->content,"value",OGR_G_ExportToGML(res)); 868 char *tmp=OGR_G_ExportToGML(res); 869 setMapInMaps(outputs,"Result","value",tmp); 870 free(tmp); 865 871 } 866 872 outputs->next=NULL;