fix kmllayer when opts is  not defined