In my case I had extra spaced after the closing node. <Grid> <Polygon/> <!--spaces here--> <Polyline/> <!--spaces here--> </Grid>