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

Method startShape

mapkmlrenderer.cpp:930–976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928}
929
930void KmlRenderer::startShape(imageObj *, shapeObj *shape)
931{
932 if (PlacemarkNode)
933 flushPlacemark();
934
935 CurrentShapeIndex=-1;
936 CurrentDrawnShapeIndex = -1;
937 CurrentShapeName=NULL;
938
939 /*should be done at endshape but the plugin architecture does not call endshape yet*/
940 if(LineStyle)
941 {
942 msFree(LineStyle);
943
944 LineStyle = NULL;
945 numLineStyle = 0;
946 }
947
948 if (shape)
949 {
950 CurrentShapeIndex = shape->index;
951 if (pszLayerNameAttributeMetadata)
952 {
953 for (int i=0; i<currentLayer->numitems; i++)
954 {
955 if (strcasecmp(currentLayer->items[i], pszLayerNameAttributeMetadata) == 0 && shape->values[i])
956 {
957 CurrentShapeName = msStrdup(shape->values[i]);
958 break;
959 }
960 }
961 }
962 }
963 PlacemarkNode = NULL;
964 GeomNode = NULL;
965
966 DescriptionNode = createDescriptionNode(shape);
967
968 if( mElevationFromAttribute && shape->numvalues > mElevationAttributeIndex &&
969 mElevationAttributeIndex >= 0 && shape->values[mElevationAttributeIndex])
970 {
971 mCurrentElevationValue = atof( shape->values[mElevationAttributeIndex] );
972 }
973
974
975 memset(SymbologyFlag, 0, NumSymbologyFlag);
976}
977
978void KmlRenderer::endShape(imageObj*, shapeObj*)
979{

Callers 2

msDrawStartShapeFunction · 0.80
msStartShapeKmlFunction · 0.80

Calls 3

msFreeFunction · 0.85
strcasecmpFunction · 0.85
msStrdupFunction · 0.85

Tested by

no test coverage detected