fixed initLayer, initField, fieldType
use layer pendingFields()
Merge pull request #1 from blazek/master

fixed initLayer, initField, fieldType