Changeset 362
- Timestamp:
- Aug 7, 2012, 12:28:05 PM (12 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service.h
r361 r362 645 645 646 646 static int addMapsArrayToMaps(maps** mo,maps* mi,char* typ){ 647 maps* tmp=mi; 648 maps* _cursor=*mo; 649 maps* tmpMaps=getMaps(_cursor,tmp->name); 650 651 if(tmpMaps==NULL) 647 maps* tmp=mi; 648 maps* _cursor=getMaps(*mo,tmp->name); 649 650 if(_cursor==NULL) 652 651 return -1; 653 652 654 map* tmpLength=getMap( tmpMaps->content,"length");653 map* tmpLength=getMap(_cursor->content,"length"); 655 654 char tmpLen[10]; 656 655 int len=1; -
trunk/zoo-project/zoo-kernel/service_internal_ms.c
r361 r362 175 175 OSRImportFromWkt( hSRS, &pszProjection ) == CE_None ){ 176 176 char *proj4Str=NULL; 177 if(OSRGetAuthorityName(hSRS,NULL)!=NULL && OSRGetAuthorityCode(hSRS,NULL)!=NULL){ 177 if(OSRGetAuthorityName(hSRS,NULL)!=NULL && 178 OSRGetAuthorityCode(hSRS,NULL)!=NULL){ 178 179 char tmpSrs[20]; 179 180 sprintf(tmpSrs,"%s:%s", … … 236 237 } 237 238 if(msSrs!=NULL){ 238 if(output!=NULL){239 addToMap(output->content,"crs",msSrs->value);240 addToMap(output->content,"crs_isGeographic","true");241 }242 239 msLoadProjectionStringEPSG(&m->projection,msSrs->value); 243 240 msLoadProjectionStringEPSG(&myLayer->projection,msSrs->value); … … 247 244 msInsertHashTable(&(myLayer->metadata),"ows_srs",tmpSrs); 248 245 }else{ 249 if(output!=NULL){250 addToMap(output->content,"crs","EPSG:4326");251 addToMap(output->content,"crs_isGeographic","true");252 }253 246 msLoadProjectionStringEPSG(&m->projection,"EPSG:4326"); 254 247 msLoadProjectionStringEPSG(&myLayer->projection,"EPSG:4326"); 255 248 msInsertHashTable(&(m->web.metadata),"ows_srs","EPSG:4326 EPSG:900913"); 256 249 msInsertHashTable(&(myLayer->metadata),"ows_srs","EPSG:4326 EPSG:900913"); 250 } 251 if(output!=NULL){ 252 addToMap(output->content,"crs",msSrs->value); 253 addToMap(output->content,"crs_isGeographic","true"); 257 254 } 258 255 } -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r360 r362 99 99 */ 100 100 int appendMapsToMaps(maps* m,maps* mo,maps* mi,elements* elem){ 101 102 map* tmap=getMapType(mo->content); 101 maps* tmpMaps=getMaps(mo,mi->name); 102 map* tmap=getMapType(tmpMaps->content); 103 elements* el=getElements(elem,mi->name); 104 int hasEl=1; 105 if(el==NULL) 106 hasEl=-1; 103 107 if(tmap==NULL){ 104 tmap=getMapType(elem->defaults->content); 105 } 106 107 map* testMap=getMap(elem->content,"maxOccurs"); 108 if(hasEl>0) 109 tmap=getMapType(el->defaults->content); 110 } 111 112 map* testMap=NULL; 113 if(hasEl>0){ 114 testMap=getMap(el->content,"maxOccurs"); 115 }else{ 116 testMap=createMap("maxOccurs","unbounded"); 117 } 118 108 119 if(testMap!=NULL){ 109 120 if(strncasecmp(testMap->value,"unbounded",9)!=0 && atoi(testMap->value)>1){ … … 116 127 }else{ 117 128 if(strncasecmp(testMap->value,"unbounded",9)==0){ 129 if(hasEl<0){ 130 freeMap(&testMap); 131 free(testMap); 132 } 118 133 if(addMapsArrayToMaps(&mo,mi,tmap->name)<0){ 119 134 char emsg[1024];
Note: See TracChangeset
for help on using the changeset viewer.